nus-yam/ex-repair huggingface dataset:
Program: 187475
Project: 187475
Buggy source:
@SuppressWarnings("String_Node_Str") public static TagBase vanillaCompoundToCompound(NBTBase vanillaTag){
switch (vanillaTag.getTypeId()) {
case 1:
    return new TagByte(((NBTTagByte)vanillaTag).f());
case 2:
  return new TagShort(((NBTTagShort)vanillaTag).e());
case 3:
return new TagInt(((NBTTagInt)vanillaTag).e());
case 4:
return new TagLong(((NBTTagLong)vanillaTag).d());
case 5:
return new TagFloat(((NBTTagFloat)vanillaTag).h());
case 6:
return new TagDouble(((NBTTagDouble)vanillaTag).g());
case 7:
return new TagByteArray(((NBTTagByteArray)vanillaTag).c());
case 8:
return new TagString(((NBTTagString)vanillaTag).c_());
case 9:
NBTTagList tagList=(NBTTagList)vanillaTag;
List compoundList=new ArrayList();
try {
ArrayList list=(ArrayList)TAG_LIST_LIST.get(tagList);
for (Object aList : list) {
compoundList.add(vanillaCompoundToCompound((NBTBase)aList));
}
}
 catch (IllegalAccessException e) {
e.printStackTrace();
}
return new TagList(compoundList);
case 10:
TagCompound compound=new TagCompound();
NBTTagCompound tagCompound=((NBTTagCompound)vanillaTag);
Set<String> keys=tagCompound.c();
for (String tagName : keys) {
compound.getCompoundData().put(tagName,vanillaCompoundToCompound(tagCompound.get(tagName)));
}
return compound;
case 11:
return new TagIntArray(((NBTTagIntArray)vanillaTag).d());
}
return null;
}

Fixed version (ground truth):
@SuppressWarnings("String_Node_Str") public static TagBase vanillaCompoundToCompound(NBTBase vanillaTag){
switch (vanillaTag.getTypeId()) {
case 1:
    return new TagByte(((NBTTagByte)vanillaTag).g());
case 2:
  return new TagShort(((NBTTagShort)vanillaTag).f());
case 3:
return new TagInt(((NBTTagInt)vanillaTag).e());
case 4:
return new TagLong(((NBTTagLong)vanillaTag).d());
case 5:
return new TagFloat(((NBTTagFloat)vanillaTag).i());
case 6:
return new TagDouble(((NBTTagDouble)vanillaTag).h());
case 7:
return new TagByteArray(((NBTTagByteArray)vanillaTag).c());
case 8:
return new TagString(((NBTTagString)vanillaTag).c_());
case 9:
NBTTagList tagList=(NBTTagList)vanillaTag;
List compoundList=new ArrayList();
try {
ArrayList list=(ArrayList)TAG_LIST_LIST.get(tagList);
for (Object aList : list) {
compoundList.add(vanillaCompoundToCompound((NBTBase)aList));
}
}
 catch (IllegalAccessException e) {
e.printStackTrace();
}
return new TagList(compoundList);
case 10:
TagCompound compound=new TagCompound();
NBTTagCompound tagCompound=((NBTTagCompound)vanillaTag);
Set<String> keys=tagCompound.c();
for (String tagName : keys) {
compound.getCompoundData().put(tagName,vanillaCompoundToCompound(tagCompound.get(tagName)));
}
return compound;
case 11:
return new TagIntArray(((NBTTagIntArray)vanillaTag).d());
}
return null;
}
Program: 187476
Project: 187476
Buggy source:
@SuppressWarnings("String_Node_Str") public static TagBase vanillaCompoundToCompound(NBTBase vanillaTag){
switch (vanillaTag.getTypeId()) {
case 1:
    return new TagByte(((NBTTagByte)vanillaTag).f());
case 2:
  return new TagShort(((NBTTagShort)vanillaTag).e());
case 3:
return new TagInt(((NBTTagInt)vanillaTag).e());
case 4:
return new TagLong(((NBTTagLong)vanillaTag).d());
case 5:
return new TagFloat(((NBTTagFloat)vanillaTag).i());
case 6:
return new TagDouble(((NBTTagDouble)vanillaTag).g());
case 7:
return new TagByteArray(((NBTTagByteArray)vanillaTag).c());
case 8:
return new TagString(((NBTTagString)vanillaTag).c_());
case 9:
NBTTagList tagList=(NBTTagList)vanillaTag;
List compoundList=new ArrayList();
try {
ArrayList list=(ArrayList)TAG_LIST_LIST.get(tagList);
for (Object aList : list) {
compoundList.add(vanillaCompoundToCompound((NBTBase)aList));
}
}
 catch (IllegalAccessException e) {
e.printStackTrace();
}
return new TagList(compoundList);
case 10:
TagCompound compound=new TagCompound();
NBTTagCompound tagCompound=((NBTTagCompound)vanillaTag);
Set<String> keys=tagCompound.c();
for (String tagName : keys) {
compound.getCompoundData().put(tagName,vanillaCompoundToCompound(tagCompound.get(tagName)));
}
return compound;
case 11:
return new TagIntArray(((NBTTagIntArray)vanillaTag).d());
}
return null;
}

Fixed version (ground truth):
@SuppressWarnings("String_Node_Str") public static TagBase vanillaCompoundToCompound(NBTBase vanillaTag){
switch (vanillaTag.getTypeId()) {
case 1:
    return new TagByte(((NBTTagByte)vanillaTag).g());
case 2:
  return new TagShort(((NBTTagShort)vanillaTag).f());
case 3:
return new TagInt(((NBTTagInt)vanillaTag).e());
case 4:
return new TagLong(((NBTTagLong)vanillaTag).d());
case 5:
return new TagFloat(((NBTTagFloat)vanillaTag).i());
case 6:
return new TagDouble(((NBTTagDouble)vanillaTag).asDouble());
case 7:
return new TagByteArray(((NBTTagByteArray)vanillaTag).c());
case 8:
return new TagString(((NBTTagString)vanillaTag).c_());
case 9:
NBTTagList tagList=(NBTTagList)vanillaTag;
List compoundList=new ArrayList();
try {
ArrayList list=(ArrayList)TAG_LIST_LIST.get(tagList);
for (Object aList : list) {
compoundList.add(vanillaCompoundToCompound((NBTBase)aList));
}
}
 catch (IllegalAccessException e) {
e.printStackTrace();
}
return new TagList(compoundList);
case 10:
TagCompound compound=new TagCompound();
NBTTagCompound tagCompound=((NBTTagCompound)vanillaTag);
Set<String> keys=tagCompound.c();
for (String tagName : keys) {
compound.getCompoundData().put(tagName,vanillaCompoundToCompound(tagCompound.get(tagName)));
}
return compound;
case 11:
return new TagIntArray(((NBTTagIntArray)vanillaTag).d());
}
return null;
}
Program: 187477
Project: 187477
Buggy source:
@SuppressWarnings("String_Node_Str") public static TagBase vanillaCompoundToCompound(NBTBase vanillaTag){
switch (vanillaTag.getTypeId()) {
case 1:
    return new TagByte(((NBTTagByte)vanillaTag).f());
case 2:
  return new TagShort(((NBTTagShort)vanillaTag).e());
case 3:
return new TagInt(((NBTTagInt)vanillaTag).e());
case 4:
return new TagLong(((NBTTagLong)vanillaTag).d());
case 5:
return new TagFloat(((NBTTagFloat)vanillaTag).i());
case 6:
return new TagDouble(((NBTTagDouble)vanillaTag).g());
case 7:
return new TagByteArray(((NBTTagByteArray)vanillaTag).c());
case 8:
return new TagString(((NBTTagString)vanillaTag).c_());
case 9:
NBTTagList tagList=(NBTTagList)vanillaTag;
List compoundList=new ArrayList();
try {
ArrayList list=(ArrayList)TAG_LIST_LIST.get(tagList);
for (Object aList : list) {
compoundList.add(vanillaCompoundToCompound((NBTBase)aList));
}
}
 catch (IllegalAccessException e) {
e.printStackTrace();
}
return new TagList(compoundList);
case 10:
TagCompound compound=new TagCompound();
NBTTagCompound tagCompound=((NBTTagCompound)vanillaTag);
Set<String> keys=tagCompound.c();
for (String tagName : keys) {
compound.getCompoundData().put(tagName,vanillaCompoundToCompound(tagCompound.get(tagName)));
}
return compound;
case 11:
return new TagIntArray(((NBTTagIntArray)vanillaTag).d());
}
return null;
}

Fixed version (ground truth):
@SuppressWarnings("String_Node_Str") public static TagBase vanillaCompoundToCompound(NBTBase vanillaTag){
switch (vanillaTag.getTypeId()) {
case 1:
    return new TagByte(((NBTTagByte)vanillaTag).g());
case 2:
  return new TagShort(((NBTTagShort)vanillaTag).f());
case 3:
return new TagInt(((NBTTagInt)vanillaTag).e());
case 4:
return new TagLong(((NBTTagLong)vanillaTag).d());
case 5:
return new TagFloat(((NBTTagFloat)vanillaTag).i());
case 6:
return new TagDouble(((NBTTagDouble)vanillaTag).asDouble());
case 7:
return new TagByteArray(((NBTTagByteArray)vanillaTag).c());
case 8:
return new TagString(((NBTTagString)vanillaTag).c_());
case 9:
NBTTagList tagList=(NBTTagList)vanillaTag;
List compoundList=new ArrayList();
try {
ArrayList list=(ArrayList)TAG_LIST_LIST.get(tagList);
for (Object aList : list) {
compoundList.add(vanillaCompoundToCompound((NBTBase)aList));
}
}
 catch (IllegalAccessException e) {
e.printStackTrace();
}
return new TagList(compoundList);
case 10:
TagCompound compound=new TagCompound();
NBTTagCompound tagCompound=((NBTTagCompound)vanillaTag);
Set<String> keys=tagCompound.c();
for (String tagName : keys) {
compound.getCompoundData().put(tagName,vanillaCompoundToCompound(tagCompound.get(tagName)));
}
return compound;
case 11:
return new TagIntArray(((NBTTagIntArray)vanillaTag).d());
}
return null;
}
Program: 187478
Project: 187478
Buggy source:
@SuppressWarnings("String_Node_Str") public List getBlockBBsInBB(World world,AxisAlignedBB axisalignedbb){
  UnsafeList unsafeList=new UnsafeList();
  int minX=MathHelper.floor(axisalignedbb.a);
  int maxX=(int)Math.ceil(axisalignedbb.d);
  int minY=MathHelper.floor(axisalignedbb.b);
  int maxY=(int)Math.ceil(axisalignedbb.e);
  int minZ=MathHelper.floor(axisalignedbb.c);
  int maxZ=(int)Math.ceil(axisalignedbb.f);
  for (int x=minX; x <= maxX; x++) {
    for (int z=minZ; z <= maxZ; z++) {
      if (world.isChunkLoaded(x >> 4,z >> 4)) {
        for (int y=minY - 1; y <= maxY; y++) {
          Block block=CraftMagicNumbers.getBlock(world.getBlockAt(x,y,z));
          if (block != null && block.getBlockData().getMaterial().isSolid()) {
            block.a(block.getBlockData(),((CraftWorld)world).getHandle(),new BlockPosition(x,y,z),axisalignedbb,unsafeList,null);
          }
        }
      }
    }
  }
  return unsafeList;
}

Fixed version (ground truth):
@SuppressWarnings("String_Node_Str") public List getBlockBBsInBB(World world,AxisAlignedBB axisalignedbb){
  UnsafeList unsafeList=new UnsafeList();
  int minX=MathHelper.floor(axisalignedbb.a);
  int maxX=(int)Math.ceil(axisalignedbb.d);
  int minY=MathHelper.floor(axisalignedbb.b);
  int maxY=(int)Math.ceil(axisalignedbb.e);
  int minZ=MathHelper.floor(axisalignedbb.c);
  int maxZ=(int)Math.ceil(axisalignedbb.f);
  for (int x=minX; x <= maxX; x++) {
    for (int z=minZ; z <= maxZ; z++) {
      if (world.isChunkLoaded(x >> 4,z >> 4)) {
        for (int y=minY - 1; y <= maxY; y++) {
          Block block=CraftMagicNumbers.getBlock(world.getBlockAt(x,y,z));
          if (block != null && block.getBlockData().getMaterial().isSolid()) {
            BlockPosition bp=new BlockPosition(x,y,z);
            AxisAlignedBB res=block.getBlockData().c(((CraftWorld)world).getHandle(),bp);
            if (res != null && res != Block.k) {
              AxisAlignedBB axisalignedbb2=res.a(bp);
              if (axisalignedbb.c(axisalignedbb2)) {
                unsafeList.add(axisalignedbb2);
              }
            }
          }
        }
      }
    }
  }
  return unsafeList;
}
Program: 187481
Project: 187481
Buggy source:
@EventHandler public void on(PlayerGameModeChangeEvent event){
  if (event.getNewGameMode() == GameMode.SPECTATOR) {
    if (MyPetApi.getPlayerManager().isMyPetPlayer(event.getPlayer())) {
      MyPetPlayer myPetPlayerDamagee=MyPetApi.getPlayerManager().getMyPetPlayer(event.getPlayer());
      if (myPetPlayerDamagee.hasMyPet()) {
        myPetPlayerDamagee.getMyPet().removePet();
      }
    }
  }
 else {
    if (MyPetApi.getPlayerManager().isMyPetPlayer(event.getPlayer())) {
      MyPetPlayer myPetPlayerDamagee=MyPetApi.getPlayerManager().getMyPetPlayer(event.getPlayer());
      if (myPetPlayerDamagee.hasMyPet()) {
        MyPet myPet=myPetPlayerDamagee.getMyPet();
        if (myPet.wantsToRespawn()) {
switch (myPet.createEntity()) {
case Success:
            myPetPlayerDamagee.sendMessage(Util.formatText(Translation.getString("String_Node_Str",myPetPlayerDamagee),myPet.getPetName()));
          break;
      }
    }
  }
}
}
}

Fixed version (ground truth):
@EventHandler public void on(PlayerGameModeChangeEvent event){
  if (event.getNewGameMode().name().equals("String_Node_Str")) {
    if (MyPetApi.getPlayerManager().isMyPetPlayer(event.getPlayer())) {
      MyPetPlayer myPetPlayerDamagee=MyPetApi.getPlayerManager().getMyPetPlayer(event.getPlayer());
      if (myPetPlayerDamagee.hasMyPet()) {
        myPetPlayerDamagee.getMyPet().removePet();
      }
    }
  }
 else {
    if (MyPetApi.getPlayerManager().isMyPetPlayer(event.getPlayer())) {
      MyPetPlayer myPetPlayerDamagee=MyPetApi.getPlayerManager().getMyPetPlayer(event.getPlayer());
      if (myPetPlayerDamagee.hasMyPet()) {
        MyPet myPet=myPetPlayerDamagee.getMyPet();
        if (myPet.wantsToRespawn()) {
switch (myPet.createEntity()) {
case Success:
            myPetPlayerDamagee.sendMessage(Util.formatText(Translation.getString("String_Node_Str",myPetPlayerDamagee),myPet.getPetName()));
          break;
      }
    }
  }
}
}
}
Program: 187484
Project: 187484
Buggy source:
public boolean onCommand(CommandSender sender,Command command,String label,String[] args){
  if (sender instanceof Player) {
    Player player=(Player)sender;
    if (MyPetApi.getMyPetList().hasActiveMyPet(player)) {
      ActiveMyPet myPet=MyPetApi.getMyPetList().getMyPet(player);
      if (!Permissions.hasExtended(player,"String_Node_Str",true)) {
        myPet.getOwner().sendMessage(Translation.getString("String_Node_Str",player));
        return true;
      }
      if (myPet.getStatus() == PetState.Despawned) {
        sender.sendMessage(Util.formatText(Translation.getString("String_Node_Str",player),myPet.getPetName()));
        return true;
      }
      if (myPet.getStatus() == PetState.Dead) {
        sender.sendMessage(Util.formatText(Translation.getString("String_Node_Str",player),myPet.getPetName(),myPet.getRespawnTime()));
        return true;
      }
      if (myPet.getSkills().hasSkill(Beacon.class)) {
        myPet.getSkills().getSkill(Beacon.class).activate();
      }
    }
 else {
      sender.sendMessage(Translation.getString("String_Node_Str",player));
    }
    return true;
  }
  sender.sendMessage("String_Node_Str");
  return true;
}

Fixed version (ground truth):
public boolean onCommand(CommandSender sender,Command command,String label,String[] args){
  if (sender instanceof Player) {
    Player player=(Player)sender;
    if (MyPetApi.getMyPetList().hasActiveMyPet(player)) {
      ActiveMyPet myPet=MyPetApi.getMyPetList().getMyPet(player);
      if (!Permissions.hasExtended(player,"String_Node_Str",true)) {
        myPet.getOwner().sendMessage(Translation.getString("String_Node_Str",player));
        return true;
      }
      if (myPet.getStatus() == PetState.Despawned) {
        sender.sendMessage(Util.formatText(Translation.getString("String_Node_Str",player),myPet.getPetName()));
        return true;
      }
      if (myPet.getStatus() == PetState.Dead) {
        sender.sendMessage(Util.formatText(Translation.getString("String_Node_Str",player),myPet.getPetName(),myPet.getRespawnTime()));
        return true;
      }
      if (myPet.getSkills().isSkillActive(Beacon.class)) {
        myPet.getSkills().getSkill(Beacon.class).activate();
      }
 else {
        sender.sendMessage(Util.formatText(Translation.getString("String_Node_Str",player),myPet.getPetName(),Translation.getString("String_Node_Str",player)));
      }
      return true;
    }
 else {
      sender.sendMessage(Translation.getString("String_Node_Str",player));
    }
    return true;
  }
  sender.sendMessage("String_Node_Str");
  return true;
}
Program: 187485
Project: 187485
Buggy source:
public void onDisable(){
  if (isReady) {
    for (    MyPet myPet : MyPetList.getAllActiveMyPets()) {
      myPet.removePet();
    }
    MyPetList.clearList();
    getRepository().disable();
    BukkitUtil.unregisterMyPetEntities();
  }
  Timer.reset();
  PluginHookManager.reset();
  Hooks.disable();
  PlayerList.onlinePlayerUUIDList.clear();
  MyPetLogger.setConsole(null);
  Bukkit.getServer().getScheduler().cancelTasks(getPlugin());
  DebugLogger.info("String_Node_Str");
}

Fixed version (ground truth):
public void onDisable(){
  if (isReady) {
    for (    MyPet myPet : MyPetList.getAllActiveMyPets()) {
      myPet.removePet();
    }
    getRepository().disable();
    MyPetList.clearList();
    BukkitUtil.unregisterMyPetEntities();
  }
  Timer.reset();
  PluginHookManager.reset();
  Hooks.disable();
  PlayerList.onlinePlayerUUIDList.clear();
  MyPetLogger.setConsole(null);
  Bukkit.getServer().getScheduler().cancelTasks(getPlugin());
  DebugLogger.info("String_Node_Str");
}
Program: 187486
Project: 187486
Buggy source:
private TagList savePets(){
  List<TagCompound> petList=new ArrayList<>();
  for (  MyPet myPet : MyPetList.getAllActiveMyPets()) {
    List<InactiveMyPet> pets=myPets.get(myPet.getOwner());
    for (    InactiveMyPet pet : pets) {
      if (myPet.getUUID().equals(pet.getUUID())) {
        myPets.put(myPet.getOwner(),MyPetList.getInactiveMyPetFromMyPet(myPet));
        myPets.remove(myPet.getOwner(),pet);
        break;
      }
    }
  }
  for (  InactiveMyPet inactiveMyPet : myPets.values()) {
    try {
      TagCompound petNBT=inactiveMyPet.save();
      petList.add(petNBT);
    }
 catch (    Exception e) {
      DebugLogger.printThrowable(e);
    }
  }
  return new TagList(petList);
}

Fixed version (ground truth):
private TagList savePets(){
  List<TagCompound> petList=new ArrayList<>();
  for (  MyPet myPet : MyPetList.getAllActiveMyPets()) {
    List<InactiveMyPet> pets=myPets.get(myPet.getOwner());
    for (    InactiveMyPet pet : pets) {
      if (myPet.getUUID().equals(pet.getUUID())) {
        InactiveMyPet inactiveMyPet=MyPetList.getInactiveMyPetFromMyPet(myPet);
        if (inactiveMyPet != null) {
          myPets.remove(myPet.getOwner(),pet);
          myPets.put(myPet.getOwner(),inactiveMyPet);
        }
        break;
      }
    }
  }
  for (  InactiveMyPet inactiveMyPet : myPets.values()) {
    try {
      TagCompound petNBT=inactiveMyPet.save();
      petList.add(petNBT);
    }
 catch (    Exception e) {
      DebugLogger.printThrowable(e);
    }
  }
  return new TagList(petList);
}
Program: 187487
Project: 187487
Buggy source:
@Override public void addMyPetPlayer(final MyPetPlayer player,final RepositoryCallback<Boolean> callback){
  if (players.containsKey(player.getInternalUUID())) {
    players.put(player.getInternalUUID(),player);
    if (SAVE_ON_PLAYER_ADD) {
      saveData(true);
    }
    if (callback != null) {
      callback.setValue(true);
      callback.run();
    }
    return;
  }
  if (callback != null) {
    callback.setValue(false);
    callback.run();
  }
}

Fixed version (ground truth):
@Override public void addMyPetPlayer(final MyPetPlayer player,final RepositoryCallback<Boolean> callback){
  if (!players.containsKey(player.getInternalUUID())) {
    players.put(player.getInternalUUID(),player);
    if (SAVE_ON_PLAYER_ADD) {
      saveData(true);
    }
    if (callback != null) {
      callback.setValue(true);
      callback.run();
    }
    return;
  }
  if (callback != null) {
    callback.setValue(false);
    callback.run();
  }
}
Program: 187488
Project: 187488
Buggy source:
@Override public void callback(List<InactiveMyPet> value){
  for (  InactiveMyPet inactiveMyPet : value) {
    if (inactiveMyPet.getUUID().equals(groupMyPetUUID)) {
      MyPetList.activateMyPet(inactiveMyPet);
      MyPet activeMyPet=joinedPlayer.getMyPet();
      activeMyPet.sendMessageToOwner(Util.formatText(Locales.getString("String_Node_Str",joinedPlayer),activeMyPet.getPetName()));
      break;
    }
  }
  if (!joinedPlayer.hasMyPet() && value.size() > 0) {
    joinedPlayer.getPlayer().sendMessage(Locales.getString("String_Node_Str",joinedPlayer));
    joinedPlayer.setMyPetForWorldGroup(joinGroup.getName(),null);
  }
}

Fixed version (ground truth):
@Override public void callback(InactiveMyPet inactiveMyPet){
  MyPetList.activateMyPet(inactiveMyPet);
  if (joinedPlayer.hasMyPet()) {
    final MyPet myPet=joinedPlayer.getMyPet();
    final MyPetPlayer myPetPlayer=myPet.getOwner();
    if (myPet.wantToRespawn()) {
      if (myPetPlayer.hasMyPet()) {
        MyPet runMyPet=myPetPlayer.getMyPet();
switch (runMyPet.createPet()) {
case Canceled:
          runMyPet.sendMessageToOwner(Util.formatText(Locales.getString("String_Node_Str",myPet.getOwner()),runMyPet.getPetName()));
        break;
case NoSpace:
      runMyPet.sendMessageToOwner(Util.formatText(Locales.getString("String_Node_Str",myPet.getOwner()),runMyPet.getPetName()));
    break;
case NotAllowed:
  runMyPet.sendMessageToOwner(Locales.getString("String_Node_Str",myPet.getOwner()).replace("String_Node_Str",myPet.getPetName()));
break;
case Dead:
runMyPet.sendMessageToOwner(Locales.getString("String_Node_Str",myPet.getOwner()).replace("String_Node_Str",myPet.getPetName()).replace("String_Node_Str","String_Node_Str" + myPet.getRespawnTime()));
break;
case Flying:
runMyPet.sendMessageToOwner(Util.formatText(Locales.getString("String_Node_Str",myPet.getOwner()),myPet.getPetName()));
break;
case Success:
runMyPet.sendMessageToOwner(Util.formatText(Locales.getString("String_Node_Str",myPet.getOwner()),runMyPet.getPetName()));
break;
}
}
}
 else {
myPet.setStatus(MyPet.PetState.Despawned);
}
}
}
Program: 187490
Project: 187490
Buggy source:
@Override public boolean onCommandOption(final CommandSender sender,String[] args){
  if (args.length < 1) {
    return false;
  }
  if (Util.isInt(args[0])) {
    final int days=Integer.parseInt(args[0]);
    MyPetList.getAllInactiveMyPets(new RepositoryCallback<Collection<InactiveMyPet>>(){
      @Override public void callback(      Collection<InactiveMyPet> value){
        boolean deleteOld=days == -1;
        List<InactiveMyPet> deletionList=new ArrayList<>();
        for (        InactiveMyPet inactiveMyPet : value) {
          if (inactiveMyPet.getLastUsed() != -1 && !deleteOld) {
            if (TimeUnit.MILLISECONDS.toDays(System.currentTimeMillis() - inactiveMyPet.getLastUsed()) > days) {
              deletionList.add(inactiveMyPet);
            }
          }
 else           if (inactiveMyPet.getLastUsed() == -1 && deleteOld) {
            deletionList.add(inactiveMyPet);
          }
        }
        int deletedPetCount=deletionList.size();
        if (deletedPetCount > 0) {
          if (Backup.MAKE_BACKUPS) {
          }
          for (          InactiveMyPet inactiveMyPet : deletionList) {
            MyPetList.removeInactiveMyPet(inactiveMyPet);
          }
        }
        sender.sendMessage("String_Node_Str" + ChatColor.AQUA + "String_Node_Str"+ ChatColor.RESET+ "String_Node_Str"+ deletedPetCount+ "String_Node_Str");
      }
    }
);
  }
  return true;
}

Fixed version (ground truth):
@Override public boolean onCommandOption(final CommandSender sender,String[] args){
  if (args.length < 1) {
    return false;
  }
  if (Util.isInt(args[0])) {
    final int days=Integer.parseInt(args[0]);
  }
  return true;
}
Program: 187493
Project: 187493
Buggy source:
public static void clearList(){
  mActivePlayerPets.clear();
  MyPetPlugin.getPlugin().getRepository().disable();
}

Fixed version (ground truth):
public static void clearList(){
  MyPetPlugin.getPlugin().getRepository().disable();
  mActivePlayerPets.clear();
}
Program: 187495
Project: 187495
Buggy source:
public static boolean isPluginUsable(String pluginName,String className){
  if (pluginManager == null) {
    pluginManager=Bukkit.getServer().getPluginManager();
  }
  if (pluginFound.containsKey(pluginName)) {
    return pluginFound.get(pluginName);
  }
  if (!pluginNames.containsKey(pluginName)) {
    JavaPlugin plugin=(JavaPlugin)pluginManager.getPlugin(pluginName);
    if (plugin != null && plugin.isEnabled() && plugin.getClass().getName().equals(className)) {
      return getPluginInstance(plugin.getClass()) != null;
    }
 else {
      pluginFound.put(pluginName,false);
    }
    return false;
  }
 else {
    return true;
  }
}

Fixed version (ground truth):
public static boolean isPluginUsable(String pluginName,String className){
  if (pluginManager == null) {
    pluginManager=Bukkit.getPluginManager();
  }
  if (pluginFound.containsKey(className)) {
    return pluginFound.get(className);
  }
  if (!pluginNames.containsKey(pluginName)) {
    JavaPlugin plugin=(JavaPlugin)pluginManager.getPlugin(pluginName);
    if (plugin != null && plugin.isEnabled() && plugin.getClass().getName().equals(className)) {
      return getPluginInstance(plugin.getClass()) != null;
    }
 else {
      pluginFound.put(className,false);
    }
    return false;
  }
 else {
    return true;
  }
}
Program: 187496
Project: 187496
Buggy source:
public static <T extends JavaPlugin>T getPluginInstance(Class<T> clazz){
  if (pluginManager == null) {
    pluginManager=Bukkit.getServer().getPluginManager();
  }
  if (pluginInstances.containsKey(clazz.getName())) {
    return clazz.cast(pluginInstances.get(clazz.getName()));
  }
  try {
    T plugin=JavaPlugin.getPlugin(clazz);
    if (plugin != null) {
      pluginInstances.put(clazz.getName(),plugin);
      pluginFound.put(clazz.getName(),true);
      pluginNames.put(plugin.getName(),clazz.getName());
      DebugLogger.info("String_Node_Str" + plugin.getName() + "String_Node_Str"+ clazz.getName()+ "String_Node_Str");
      return plugin;
    }
  }
 catch (  NoSuchMethodError e) {
    for (    Plugin p : pluginManager.getPlugins()) {
      if (clazz.isInstance(p)) {
        T plugin=clazz.cast(p);
        pluginInstances.put(clazz.getName(),plugin);
        pluginFound.put(clazz.getName(),true);
        pluginNames.put(plugin.getName(),clazz.getName());
        DebugLogger.info("String_Node_Str" + plugin.getName() + "String_Node_Str"+ clazz.getName()+ "String_Node_Str");
        return plugin;
      }
    }
  }
  pluginFound.put(clazz.getName(),false);
  return null;
}

Fixed version (ground truth):
public static <T extends JavaPlugin>T getPluginInstance(Class<T> clazz){
  if (pluginManager == null) {
    pluginManager=Bukkit.getPluginManager();
  }
  if (pluginInstances.containsKey(clazz.getName())) {
    return clazz.cast(pluginInstances.get(clazz.getName()));
  }
  try {
    T plugin=JavaPlugin.getPlugin(clazz);
    if (plugin != null) {
      pluginInstances.put(clazz.getName(),plugin);
      pluginFound.put(clazz.getName(),true);
      pluginNames.put(plugin.getName(),clazz.getName());
      DebugLogger.info("String_Node_Str" + plugin.getName() + "String_Node_Str"+ clazz.getName()+ "String_Node_Str");
      return plugin;
    }
  }
 catch (  NoSuchMethodError e) {
    for (    Plugin p : pluginManager.getPlugins()) {
      if (clazz.isInstance(p)) {
        T plugin=clazz.cast(p);
        pluginInstances.put(clazz.getName(),plugin);
        pluginFound.put(clazz.getName(),true);
        pluginNames.put(plugin.getName(),clazz.getName());
        DebugLogger.info("String_Node_Str" + plugin.getName() + "String_Node_Str"+ clazz.getName()+ "String_Node_Str");
        return plugin;
      }
    }
  }
  pluginFound.put(clazz.getName(),false);
  return null;
}
Program: 187497
Project: 187497
Buggy source:
public static void reset(){
  pluginMobArena=null;
  PluginHookManager.reset();
}

Fixed version (ground truth):
public static void reset(){
  pluginMobArena=null;
}
Program: 187498
Project: 187498
Buggy source:
public static boolean isInSurvivalGames(MyPetPlayer owner){
  if (active) {
    try {
      return me.maker56.survivalgames.SurvivalGames.getUserManager().isPlaying(owner.getPlayer().getName()) || me.maker56.survivalgames.SurvivalGames.getUserManager().isSpectator(owner.getPlayer().getName());
    }
 catch (    Throwable e) {
      active=false;
    }
  }
  return false;
}

Fixed version (ground truth):
public static boolean isInSurvivalGames(MyPetPlayer owner){
  if (active) {
    try {
      return getUserManager().isPlaying(owner.getPlayer().getName()) || getUserManager().isSpectator(owner.getPlayer().getName());
    }
 catch (    Throwable e) {
      active=false;
    }
  }
  return false;
}
Program: 187501
Project: 187501
Buggy source:
@Override public void readExtendedInfo(TagCompound info){
  if (info.containsKeyAs("String_Node_Str",TagInt.class)) {
    setVariant(RabbitType.getTypeByID(info.getAs("String_Node_Str",TagByte.class).getByteData()));
  }
  if (info.getCompoundData().containsKey("String_Node_Str")) {
    setBaby(info.getAs("String_Node_Str",TagByte.class).getBooleanData());
  }
}

Fixed version (ground truth):
@Override public void readExtendedInfo(TagCompound info){
  if (info.containsKeyAs("String_Node_Str",TagByte.class)) {
    setVariant(RabbitType.getTypeByID(info.getAs("String_Node_Str",TagByte.class).getByteData()));
  }
  if (info.getCompoundData().containsKey("String_Node_Str")) {
    setBaby(info.getAs("String_Node_Str",TagByte.class).getBooleanData());
  }
}
Program: 187507
Project: 187507
Buggy source:
public boolean setSkilltree(SkillTree skillTree){
  if (skillTree == null || this.skillTree == skillTree) {
    return false;
  }
  if (skillTree.getRequiredLevel() > 1 && getExperience().getLevel() < skillTree.getRequiredLevel()) {
    return false;
  }
  skills.reset();
  this.skillTree=skillTree;
  getServer().getPluginManager().callEvent(new MyPetLevelUpEvent(this,1,experience.getLevel(),true));
  return true;
}

Fixed version (ground truth):
public boolean setSkilltree(SkillTree skillTree){
  if (skillTree == null || this.skillTree == skillTree) {
    return false;
  }
  if (skillTree.getRequiredLevel() > 1 && getExperience().getLevel() < skillTree.getRequiredLevel()) {
    return false;
  }
  skills.reset();
  this.skillTree=skillTree;
  getServer().getPluginManager().callEvent(new MyPetLevelUpEvent(this,experience.getLevel(),0,true));
  return true;
}
Program: 187508
Project: 187508
Buggy source:
public Experience(MyPet pet){
  this.myPet=pet;
  if (CALCULATION_MODE.equalsIgnoreCase("String_Node_Str") || CALCULATION_MODE.equalsIgnoreCase("String_Node_Str")) {
    expMode=new JavaScript(myPet);
  }
 else {
    expMode=new Default(myPet);
  }
  if (!expMode.isUsable()) {
    expMode=new Default(myPet);
    CALCULATION_MODE="String_Node_Str";
  }
  Bukkit.getServer().getPluginManager().callEvent(new MyPetLevelUpEvent(myPet,1,getLevel(),true));
}

Fixed version (ground truth):
public Experience(MyPet pet){
  this.myPet=pet;
  if (CALCULATION_MODE.equalsIgnoreCase("String_Node_Str") || CALCULATION_MODE.equalsIgnoreCase("String_Node_Str")) {
    expMode=new JavaScript(myPet);
  }
 else {
    expMode=new Default(myPet);
  }
  if (!expMode.isUsable()) {
    expMode=new Default(myPet);
    CALCULATION_MODE="String_Node_Str";
  }
  reset();
}
Program: 187509
Project: 187509
Buggy source:
public void reset(){
  int lastLevel=getLevel();
  exp=0;
  Bukkit.getServer().getPluginManager().callEvent(new MyPetLevelUpEvent(myPet,lastLevel,getLevel(),true));
}

Fixed version (ground truth):
public void reset(){
  exp=0;
  Bukkit.getServer().getPluginManager().callEvent(new MyPetLevelUpEvent(myPet,getLevel(),0,true));
}
Program: 187510
Project: 187510
Buggy source:
public void setExp(double exp){
  exp=exp < 0 ? 0 : exp;
  MyPetExpEvent expEvent=new MyPetExpEvent(myPet,this.getExp(),exp);
  if (Configuration.ENABLE_EVENTS) {
    Bukkit.getServer().getPluginManager().callEvent(expEvent);
    if (expEvent.isCancelled()) {
      return;
    }
  }
  int tmplvl=getLevel();
  this.exp=expEvent.getExp();
  Bukkit.getServer().getPluginManager().callEvent(new MyPetLevelUpEvent(myPet,getLevel(),tmplvl,true));
}

Fixed version (ground truth):
public void setExp(double exp){
  exp=exp < 0 ? 0 : exp;
  MyPetExpEvent expEvent=new MyPetExpEvent(myPet,this.getExp(),exp);
  if (Configuration.ENABLE_EVENTS) {
    Bukkit.getServer().getPluginManager().callEvent(expEvent);
    if (expEvent.isCancelled()) {
      return;
    }
  }
  int tmplvl=getLevel();
  this.exp=expEvent.getExp();
  if (tmplvl != getLevel()) {
    Bukkit.getServer().getPluginManager().callEvent(new MyPetLevelUpEvent(myPet,getLevel(),tmplvl,true));
  }
}
Program: 187516
Project: 187516
Buggy source:
@Override public boolean shouldStart(){
  if (behaviorSkill == null || !behaviorSkill.isActive() || behaviorSkill.getBehavior() != BehaviorState.Farm) {
    return false;
  }
  if (myPet.getDamage() <= 0 && myPet.getRangedDamage() <= 0) {
    return false;
  }
  if (!myPet.getCraftPet().canMove()) {
    return false;
  }
  if (petEntity.getGoalTarget() != null && petEntity.getGoalTarget().isAlive()) {
    return false;
  }
  for (  Object entityObj : this.petEntity.world.a(EntityMonster.class,this.petOwnerEntity.boundingBox.grow((double)range,(double)range,(double)range))) {
    EntityMonster entityMonster=(EntityMonster)entityObj;
    if (!entityMonster.isAlive() || petEntity.e(entityMonster) > 91) {
      continue;
    }
    this.target=entityMonster;
    return true;
  }
  return false;
}

Fixed version (ground truth):
@Override public boolean shouldStart(){
  if (behaviorSkill == null || !behaviorSkill.isActive() || behaviorSkill.getBehavior() != BehaviorState.Farm) {
    return false;
  }
  if (myPet.getDamage() <= 0 && myPet.getRangedDamage() <= 0) {
    return false;
  }
  if (!myPet.getCraftPet().canMove()) {
    return false;
  }
  if (petEntity.getGoalTarget() != null && petEntity.getGoalTarget().isAlive()) {
    return false;
  }
  for (  Object entityObj : this.petEntity.world.a(EntityMonster.class,this.petOwnerEntity.boundingBox.grow((double)range,(double)range,(double)range))) {
    EntityMonster entityMonster=(EntityMonster)entityObj;
    if (!entityMonster.isAlive() || petEntity.e(entityMonster) > 91) {
      continue;
    }
    if (!PvPChecker.canHurtCitizens(entityMonster.getBukkitEntity())) {
      continue;
    }
    this.target=entityMonster;
    return true;
  }
  return false;
}
Program: 187518
Project: 187518
Buggy source:
@Override public boolean shouldStart(){
  if (myPet.getDamage() <= 0 && myPet.getRangedDamage() <= 0) {
    return false;
  }
  if (petEntity.getLastDamager() == null) {
    return false;
  }
  if (target != petEntity.getLastDamager()) {
    target=petEntity.getLastDamager();
  }
  if (target == petEntity) {
    return false;
  }
  if (target instanceof EntityPlayer) {
    Player targetPlayer=(Player)target.getBukkitEntity();
    if (targetPlayer == myPet.getOwner().getPlayer()) {
      return false;
    }
 else     if (!PvPChecker.canHurt(myPet.getOwner().getPlayer(),targetPlayer)) {
      return false;
    }
  }
 else   if (target instanceof EntityMyPet) {
    MyPet targetMyPet=((EntityMyPet)target).getMyPet();
    if (!PvPChecker.canHurt(myPet.getOwner().getPlayer(),targetMyPet.getOwner().getPlayer())) {
      return false;
    }
  }
 else   if (target instanceof EntityTameableAnimal) {
    EntityTameableAnimal tameable=(EntityTameableAnimal)target;
    if (tameable.isTamed() && tameable.getOwner() != null) {
      Player tameableOwner=(Player)tameable.getOwner().getBukkitEntity();
      if (myPet.getOwner().equals(tameableOwner)) {
        return false;
      }
    }
  }
  return true;
}

Fixed version (ground truth):
@Override public boolean shouldStart(){
  if (myPet.getDamage() <= 0 && myPet.getRangedDamage() <= 0) {
    return false;
  }
  if (petEntity.getLastDamager() == null) {
    return false;
  }
  if (target != petEntity.getLastDamager()) {
    target=petEntity.getLastDamager();
  }
  if (target == petEntity) {
    return false;
  }
  if (target instanceof EntityPlayer) {
    Player targetPlayer=(Player)target.getBukkitEntity();
    if (targetPlayer == myPet.getOwner().getPlayer()) {
      return false;
    }
 else     if (!PvPChecker.canHurt(myPet.getOwner().getPlayer(),targetPlayer)) {
      return false;
    }
  }
 else   if (target instanceof EntityMyPet) {
    MyPet targetMyPet=((EntityMyPet)target).getMyPet();
    if (!PvPChecker.canHurt(myPet.getOwner().getPlayer(),targetMyPet.getOwner().getPlayer())) {
      return false;
    }
  }
 else   if (target instanceof EntityTameableAnimal) {
    EntityTameableAnimal tameable=(EntityTameableAnimal)target;
    if (tameable.isTamed() && tameable.getOwner() != null) {
      Player tameableOwner=(Player)tameable.getOwner().getBukkitEntity();
      if (myPet.getOwner().equals(tameableOwner)) {
        return false;
      }
    }
  }
  if (!PvPChecker.canHurtCitizens(target.getBukkitEntity())) {
    return false;
  }
  return true;
}
Program: 187521
Project: 187521
Buggy source:
public static boolean canHurtCitizens(Player defender){
  if (!searchedCitizens) {
    searchedCitizens=true;
    pluginCitizens=Bukkit.getServer().getPluginManager().isPluginEnabled("String_Node_Str");
  }
  if (USE_Citizens && pluginCitizens) {
    if (CitizensAPI.getNPCRegistry().isNPC(defender)) {
      NPC npc=CitizensAPI.getNPCRegistry().getNPC(defender);
      if (npc == null || npc.data() == null) {
        return true;
      }
      return !npc.data().get("String_Node_Str",true);
    }
  }
  return true;
}

Fixed version (ground truth):
public static boolean canHurtCitizens(Entity defender){
  if (!searchedCitizens) {
    searchedCitizens=true;
    pluginCitizens=Bukkit.getServer().getPluginManager().isPluginEnabled("String_Node_Str");
  }
  if (USE_Citizens && pluginCitizens) {
    if (CitizensAPI.getNPCRegistry().isNPC(defender)) {
      NPC npc=CitizensAPI.getNPCRegistry().getNPC(defender);
      if (npc == null || npc.data() == null) {
        return true;
      }
      return !npc.data().get("String_Node_Str",true);
    }
  }
  return true;
}
Program: 187522
Project: 187522
Buggy source:
public static String getPlayerLanguage(Player player){
  EntityPlayer entityPlayer=((CraftPlayer)player).getHandle();
  try {
    Field field=entityPlayer.getClass().getDeclaredField("String_Node_Str");
    field.setAccessible(true);
    return (String)field.get(entityPlayer);
  }
 catch (  Exception e) {
    return "String_Node_Str";
  }
}

Fixed version (ground truth):
public static String getPlayerLanguage(Player player){
  if (!(player instanceof CraftPlayer)) {
    return "String_Node_Str";
  }
  EntityPlayer entityPlayer=((CraftPlayer)player).getHandle();
  try {
    Field field=entityPlayer.getClass().getDeclaredField("String_Node_Str");
    field.setAccessible(true);
    return (String)field.get(entityPlayer);
  }
 catch (  Exception e) {
    return "String_Node_Str";
  }
}
Program: 187524
Project: 187524
Buggy source:
public void setMyPetForWorldGroup(String worldGroup,UUID myPetUUID){
  if (worldGroup == null || worldGroup.equals("String_Node_Str")) {
    return;
  }
  if (myPetUUID == null) {
    petUUIDWorld.remove(myPetUUID);
  }
 else {
    petWorldUUID.put(worldGroup,myPetUUID);
  }
}

Fixed version (ground truth):
public void setMyPetForWorldGroup(String worldGroup,UUID myPetUUID){
  if (worldGroup == null || worldGroup.equals("String_Node_Str")) {
    return;
  }
  if (myPetUUID == null) {
    petWorldUUID.remove(worldGroup);
  }
 else {
    petWorldUUID.put(worldGroup,myPetUUID);
  }
}
Program: 187526
Project: 187526
Buggy source:
public void upgrade(ISkillInfo upgrade,boolean quiet){
  if (upgrade instanceof HPInfo) {
    if (getProperties().getValue().containsKey("String_Node_Str")) {
      int hp=((IntTag)getProperties().getValue().get("String_Node_Str")).getValue();
      getProperties().getValue().remove("String_Node_Str");
      DoubleTag doubleTag=new DoubleTag("String_Node_Str",hp);
      getProperties().getValue().put("String_Node_Str",doubleTag);
    }
    if (upgrade.getProperties().getValue().containsKey("String_Node_Str")) {
      if (!upgrade.getProperties().getValue().containsKey("String_Node_Str") || ((StringTag)upgrade.getProperties().getValue().get("String_Node_Str")).getValue().equals("String_Node_Str")) {
        hpIncrease+=((DoubleTag)upgrade.getProperties().getValue().get("String_Node_Str")).getValue();
      }
 else {
        hpIncrease=((DoubleTag)upgrade.getProperties().getValue().get("String_Node_Str")).getValue();
      }
      if (getMyPet().getStatus() == PetState.Here) {
        getMyPet().getCraftPet().setMaxHealth(getMyPet().getMaxHealth());
      }
      if (!quiet) {
        myPet.sendMessageToOwner(MyPetBukkitUtil.setColors(MyPetLocales.getString("String_Node_Str",myPet.getOwner().getLanguage())).replace("String_Node_Str",myPet.getPetName()).replace("String_Node_Str","String_Node_Str" + (MyPet.getStartHP(myPet.getClass()) + hpIncrease)));
      }
    }
  }
}

Fixed version (ground truth):
public void upgrade(ISkillInfo upgrade,boolean quiet){
  if (upgrade instanceof HPInfo) {
    if (upgrade.getProperties().getValue().containsKey("String_Node_Str")) {
      int hp=((IntTag)upgrade.getProperties().getValue().get("String_Node_Str")).getValue();
      upgrade.getProperties().getValue().remove("String_Node_Str");
      DoubleTag doubleTag=new DoubleTag("String_Node_Str",hp);
      upgrade.getProperties().getValue().put("String_Node_Str",doubleTag);
    }
    if (upgrade.getProperties().getValue().containsKey("String_Node_Str")) {
      if (!upgrade.getProperties().getValue().containsKey("String_Node_Str") || ((StringTag)upgrade.getProperties().getValue().get("String_Node_Str")).getValue().equals("String_Node_Str")) {
        hpIncrease+=((DoubleTag)upgrade.getProperties().getValue().get("String_Node_Str")).getValue();
      }
 else {
        hpIncrease=((DoubleTag)upgrade.getProperties().getValue().get("String_Node_Str")).getValue();
      }
      if (getMyPet().getStatus() == PetState.Here) {
        getMyPet().getCraftPet().setMaxHealth(getMyPet().getMaxHealth());
      }
      if (!quiet) {
        myPet.sendMessageToOwner(MyPetBukkitUtil.setColors(MyPetLocales.getString("String_Node_Str",myPet.getOwner().getLanguage())).replace("String_Node_Str",myPet.getPetName()).replace("String_Node_Str","String_Node_Str" + (MyPet.getStartHP(myPet.getClass()) + hpIncrease)));
      }
    }
  }
}
Program: 187530
Project: 187530
Buggy source:
@Override public void verifyInput(){
  timeInput.setText(timeInput.getText().replaceAll("String_Node_Str","String_Node_Str"));
  if (timeInput.getText().length() > 0) {
    timeInput.setText("String_Node_Str");
  }
  healthInput.setText(healthInput.getText().replaceAll("String_Node_Str","String_Node_Str"));
  if (healthInput.getText().length() > 0) {
    if (healthInput.getText().matches("String_Node_Str")) {
      healthInput.setText("String_Node_Str");
    }
 else {
      try {
        Pattern regex=Pattern.compile("String_Node_Str");
        Matcher regexMatcher=regex.matcher(healthInput.getText());
        regexMatcher.find();
        healthInput.setText(regexMatcher.group());
      }
 catch (      PatternSyntaxException ignored) {
        healthInput.setText("String_Node_Str");
      }
    }
  }
 else {
    healthInput.setText("String_Node_Str");
  }
}

Fixed version (ground truth):
@Override public void verifyInput(){
  timeInput.setText(timeInput.getText().replaceAll("String_Node_Str","String_Node_Str"));
  if (timeInput.getText().length() == 0) {
    timeInput.setText("String_Node_Str");
  }
  healthInput.setText(healthInput.getText().replaceAll("String_Node_Str","String_Node_Str"));
  if (healthInput.getText().length() > 0) {
    if (healthInput.getText().matches("String_Node_Str")) {
      healthInput.setText("String_Node_Str");
    }
 else {
      try {
        Pattern regex=Pattern.compile("String_Node_Str");
        Matcher regexMatcher=regex.matcher(healthInput.getText());
        regexMatcher.find();
        healthInput.setText(regexMatcher.group());
      }
 catch (      PatternSyntaxException ignored) {
        healthInput.setText("String_Node_Str");
      }
    }
  }
 else {
    healthInput.setText("String_Node_Str");
  }
}
Program: 187531
Project: 187531
Buggy source:
@EventHandler public void onWorldInit(final WorldInitEvent event){
  MyPetWorldGroup defaultGroup=MyPetWorldGroup.getGroup("String_Node_Str");
  if (defaultGroup != null) {
    if (defaultGroup.addWorld(event.getWorld().getName())) {
      MyPetPlugin.getPlugin().getConfig().set("String_Node_Str",defaultGroup.getWorlds());
      MyPetPlugin.getPlugin().saveConfig();
      MyPetLogger.write("String_Node_Str" + ChatColor.GOLD + event.getWorld().getName()+ ChatColor.RESET+ "String_Node_Str");
    }
  }
}

Fixed version (ground truth):
@EventHandler public void onWorldInit(final WorldInitEvent event){
  MyPetWorldGroup defaultGroup=MyPetWorldGroup.getGroup("String_Node_Str");
  if (defaultGroup == null) {
    defaultGroup=new MyPetWorldGroup("String_Node_Str");
  }
  if (defaultGroup.addWorld(event.getWorld().getName())) {
    File groupsFile=new File(MyPetPlugin.getPlugin().getDataFolder().getPath() + File.separator + "String_Node_Str");
    YAML_Configuration yamlConfiguration=new YAML_Configuration(groupsFile);
    FileConfiguration config=yamlConfiguration.getConfig();
    config.set("String_Node_Str",defaultGroup.getWorlds());
    yamlConfiguration.saveConfig();
    MyPetLogger.write("String_Node_Str" + ChatColor.YELLOW + event.getWorld().getName()+ ChatColor.RESET+ "String_Node_Str"+ ChatColor.YELLOW+ "String_Node_Str"+ ChatColor.RESET+ "String_Node_Str");
  }
}
Program: 187532
Project: 187532
Buggy source:
@SuppressWarnings("String_Node_Str") @EventHandler(priority=EventPriority.MONITOR) public void onEntityDamageByEntityDamageMonitor(final EntityDamageByEntityEvent event){
  if (!event.isCancelled() && MyPetExperience.DAMAGE_WEIGHTED_EXPERIENCE_DISTRIBUTION && event.getEntity() instanceof LivingEntity&& !(event.getEntity() instanceof Player)) {
    LivingEntity damager=null;
    if (event.getDamager() instanceof Projectile) {
      Projectile projectile=(Projectile)event.getDamager();
      damager=projectile.getShooter();
    }
 else     if (event.getDamager() instanceof LivingEntity) {
      damager=(LivingEntity)event.getDamager();
    }
 else     if (event.getDamager() instanceof LightningStrike) {
      LightningStrike lightning=(LightningStrike)event.getDamager();
      if (Lightning.isSkillLightning(lightning)) {
        MyPet lightningMyPet=Lightning.lightningList.get(lightning);
        damager=lightningMyPet.getCraftPet();
      }
    }
    if (damager != null) {
      MyPetExperience.addDamageToEntity(damager,(LivingEntity)event.getEntity(),event.getDamage());
    }
  }
}

Fixed version (ground truth):
@SuppressWarnings("String_Node_Str") @EventHandler(priority=EventPriority.MONITOR) public void onEntityDamageByEntityDamageMonitor(final EntityDamageByEntityEvent event){
  if (!event.isCancelled() && MyPetExperience.DAMAGE_WEIGHTED_EXPERIENCE_DISTRIBUTION && event.getEntity() instanceof LivingEntity&& !(event.getEntity() instanceof Player)&& !(event.getEntity() instanceof CraftMyPet)) {
    LivingEntity damager=null;
    if (event.getDamager() instanceof Projectile) {
      Projectile projectile=(Projectile)event.getDamager();
      damager=projectile.getShooter();
    }
 else     if (event.getDamager() instanceof LivingEntity) {
      damager=(LivingEntity)event.getDamager();
    }
 else     if (event.getDamager() instanceof LightningStrike) {
      LightningStrike lightning=(LightningStrike)event.getDamager();
      if (Lightning.isSkillLightning(lightning)) {
        MyPet lightningMyPet=Lightning.lightningList.get(lightning);
        damager=lightningMyPet.getCraftPet();
      }
    }
    if (damager != null) {
      MyPetExperience.addDamageToEntity(damager,(LivingEntity)event.getEntity(),event.getDamage());
    }
  }
}
Program: 187536
Project: 187536
Buggy source:
public static MyPetMonsterExperience getMonsterExperience(EntityType type){
  return mobExp.get(type);
}

Fixed version (ground truth):
public static MyPetMonsterExperience getMonsterExperience(EntityType type){
  if (mobExp.containsKey(type)) {
    return mobExp.get(type);
  }
  return unknown;
}
Program: 187539
Project: 187539
Buggy source:
public boolean setSkilltree(MyPetSkillTree skillTree){
  if (skillTree == null || this.skillTree == skillTree) {
    return false;
  }
  skills.reset();
  if (this.skillTree != null) {
    if (this.getOwner().isMyPetAdmin() && MyPetConfiguration.SKILLTREE_SWITCH_PENALTY_ADMIN) {
      experience.removeExp(MyPetConfiguration.SKILLTREE_SWITCH_PENALTY_FIXED);
      experience.removeExp(experience.getExp() * MyPetConfiguration.SKILLTREE_SWITCH_PENALTY_PERCENT / 100.);
    }
 else {
      experience.removeExp(MyPetConfiguration.SKILLTREE_SWITCH_PENALTY_FIXED);
      experience.removeExp(experience.getExp() * MyPetConfiguration.SKILLTREE_SWITCH_PENALTY_PERCENT / 100.);
    }
  }
  this.skillTree=skillTree;
  for (int i=1; i <= experience.getLevel(); i++) {
    getServer().getPluginManager().callEvent(new MyPetLevelUpEvent(this,i,true));
  }
  return true;
}

Fixed version (ground truth):
public boolean setSkilltree(MyPetSkillTree skillTree){
  if (skillTree == null || this.skillTree == skillTree) {
    return false;
  }
  skills.reset();
  this.skillTree=skillTree;
  for (int i=1; i <= experience.getLevel(); i++) {
    getServer().getPluginManager().callEvent(new MyPetLevelUpEvent(this,i,true));
  }
  return true;
}