nus-yam/ex-repair huggingface dataset:
Program: 101789
Project: 101789
Buggy source:
public void alert(User user,Level level,CheckType type){
  List<String> messageArray=lang.getAlert();
  for (int i=0; i < messageArray.size(); i++) {
    String message=messageArray.get(i);
    message=message.replaceAll("String_Node_Str",GOLD + user.getName() + GRAY);
    message=message.replaceAll("String_Node_Str",GOLD + CheckType.getName(type) + GRAY);
    message=message.replaceAll("String_Node_Str",level.getColor() + level.getName() + GRAY);
    messageArray.set(i,message);
  }
  Utilities.alert(messageArray);
  execute(user,level.getActions(),type);
}

Fixed version (ground truth):
public void alert(User user,Level level,CheckType type){
  List<String> messageArray=config.getLang().getAlert();
  for (int i=0; i < messageArray.size(); i++) {
    String message=messageArray.get(i);
    message=message.replaceAll("String_Node_Str",GOLD + user.getName() + GRAY);
    message=message.replaceAll("String_Node_Str",GOLD + CheckType.getName(type) + GRAY);
    message=message.replaceAll("String_Node_Str",level.getColor() + level.getName() + GRAY);
    messageArray.set(i,message);
  }
  Utilities.alert(messageArray);
  execute(user,level.getActions(),type);
}
Program: 101790
Project: 101790
Buggy source:
public UserManager(Configuration conf){
  config=conf;
  lang=conf.getLang();
}

Fixed version (ground truth):
public UserManager(Configuration conf){
  config=conf;
}
Program: 101791
Project: 101791
Buggy source:
public void execute(User user,List<String> actions,CheckType type){
  final String name=user.getName();
  for (  String event : actions) {
    event=event.replaceAll("String_Node_Str",name).replaceAll("String_Node_Str",user.getPlayer().getWorld().getName()).replaceAll("String_Node_Str",type.name());
    if (event.startsWith("String_Node_Str")) {
      for (      String cmd : Utilities.getCommands(event)) {
        Bukkit.getServer().dispatchCommand(Bukkit.getConsoleSender(),cmd);
      }
    }
 else     if (event.equalsIgnoreCase("String_Node_Str")) {
      user.getPlayer().kickPlayer(RED + lang.getKickReason());
      String msg=RED + lang.getKickBroadcast().replaceAll("String_Node_Str",name);
      if (!msg.equals("String_Node_Str")) {
        Bukkit.broadcastMessage(msg);
      }
    }
 else     if (event.equalsIgnoreCase("String_Node_Str")) {
      List<String> message=lang.getWarning();
      for (      String string : message) {
        user.getPlayer().sendMessage(RED + string);
      }
    }
 else     if (event.equalsIgnoreCase("String_Node_Str")) {
      user.getPlayer().setBanned(true);
      user.getPlayer().kickPlayer(RED + lang.getBanReason());
      String msg=RED + lang.getBanBroadcast().replaceAll("String_Node_Str",name);
      if (!msg.equals("String_Node_Str")) {
        Bukkit.broadcastMessage(msg);
      }
    }
  }
}

Fixed version (ground truth):
public void execute(User user,List<String> actions,CheckType type){
  final String name=user.getName();
  for (  String event : actions) {
    event=event.replaceAll("String_Node_Str",name).replaceAll("String_Node_Str",user.getPlayer().getWorld().getName()).replaceAll("String_Node_Str",type.name());
    if (event.startsWith("String_Node_Str")) {
      for (      String cmd : Utilities.getCommands(event)) {
        Bukkit.getServer().dispatchCommand(Bukkit.getConsoleSender(),cmd);
      }
    }
 else     if (event.equalsIgnoreCase("String_Node_Str")) {
      user.getPlayer().kickPlayer(RED + config.getLang().getKickReason());
      String msg=RED + config.getLang().getKickBroadcast().replaceAll("String_Node_Str",name);
      if (!msg.equals("String_Node_Str")) {
        Bukkit.broadcastMessage(msg);
      }
    }
 else     if (event.equalsIgnoreCase("String_Node_Str")) {
      List<String> message=config.getLang().getWarning();
      for (      String string : message) {
        user.getPlayer().sendMessage(RED + string);
      }
    }
 else     if (event.equalsIgnoreCase("String_Node_Str")) {
      user.getPlayer().setBanned(true);
      user.getPlayer().kickPlayer(RED + config.getLang().getBanReason());
      String msg=RED + config.getLang().getBanBroadcast().replaceAll("String_Node_Str",name);
      if (!msg.equals("String_Node_Str")) {
        Bukkit.broadcastMessage(msg);
      }
    }
  }
}
Program: 101792
Project: 101792
Buggy source:
public Language(FileConfiguration file,File f){
  this.file=file;
  this.f=f;
  List<String> list=file.getStringList("String_Node_Str");
  if (list != null && list.size() > 0) {
    list.set(1,"String_Node_Str");
    file.set("String_Node_Str",null);
    file.set("String_Node_Str",list);
    save();
  }
  List<String> temp=file.getStringList("String_Node_Str");
  alert=new ArrayList<String>();
  alert.add(GOLD + "String_Node_Str" + GRAY+ "String_Node_Str"+ GOLD+ "String_Node_Str");
  for (int i=0; i < temp.size(); i++) {
    alert.add(GRAY + temp.get(i));
  }
  alert.add(GOLD + "String_Node_Str");
  warning=file.getStringList("String_Node_Str");
  banReason=getString("String_Node_Str","String_Node_Str");
  banBroadcast=getString("String_Node_Str","String_Node_Str");
  kickReason=getString("String_Node_Str","String_Node_Str");
  kickBroadcast=getString("String_Node_Str","String_Node_Str");
  chatWarning=getString("String_Node_Str","String_Node_Str");
  chatKickReason=getString("String_Node_Str","String_Node_Str");
  chatBanReason=getString("String_Node_Str","String_Node_Str");
  chatKickBroadcast=getString("String_Node_Str","String_Node_Str");
  chatBanBroadcast=getString("String_Node_Str","String_Node_Str");
  save();
}

Fixed version (ground truth):
public Language(FileConfiguration file,File f){
  this.file=file;
  this.f=f;
  List<String> list=file.getStringList("String_Node_Str");
  if (list != null && list.size() > 0) {
    list.set(0,"String_Node_Str");
    file.set("String_Node_Str",null);
    file.set("String_Node_Str",null);
    file.set("String_Node_Str",list);
    save();
  }
  List<String> defAlert=new ArrayList<String>();
  defAlert.add("String_Node_Str");
  defAlert.add("String_Node_Str");
  defAlert.add("String_Node_Str");
  List<String> temp=getStringList("String_Node_Str",defAlert);
  alert=new ArrayList<String>();
  alert.add(GOLD + "String_Node_Str" + GRAY+ "String_Node_Str"+ GOLD+ "String_Node_Str");
  for (int i=0; i < temp.size(); i++) {
    alert.add(GRAY + temp.get(i));
  }
  alert.add(GOLD + "String_Node_Str");
  List<String> defWarning=new ArrayList<String>();
  defWarning.add("String_Node_Str");
  defWarning.add("String_Node_Str");
  warning=getStringList("String_Node_Str",defWarning);
  banReason=getString("String_Node_Str","String_Node_Str");
  banBroadcast=getString("String_Node_Str","String_Node_Str");
  kickReason=getString("String_Node_Str","String_Node_Str");
  kickBroadcast=getString("String_Node_Str","String_Node_Str");
  chatWarning=getString("String_Node_Str","String_Node_Str");
  chatKickReason=getString("String_Node_Str","String_Node_Str");
  chatBanReason=getString("String_Node_Str","String_Node_Str");
  chatKickBroadcast=getString("String_Node_Str","String_Node_Str");
  chatBanBroadcast=getString("String_Node_Str","String_Node_Str");
  save();
}
Program: 101793
Project: 101793
Buggy source:
public void handleHelp(CommandSender cs){
  if (hasPermission(cs,Permission.SYSTEM_HELP)) {
    String base="String_Node_Str";
    String[] lines={"String_Node_Str" + WHITE + "String_Node_Str","String_Node_Str" + WHITE + "String_Node_Str","String_Node_Str" + WHITE + "String_Node_Str","String_Node_Str" + WHITE + "String_Node_Str","String_Node_Str" + WHITE + "String_Node_Str","String_Node_Str" + WHITE + "String_Node_Str","String_Node_Str" + WHITE + "String_Node_Str","String_Node_Str" + WHITE + "String_Node_Str","String_Node_Str" + WHITE + "String_Node_Str","String_Node_Str" + WHITE + "String_Node_Str"};
    cs.sendMessage("String_Node_Str" + GREEN + "String_Node_Str"+ WHITE+ "String_Node_Str");
    for (    String s : lines) {
      cs.sendMessage(base + GREEN + s);
    }
    cs.sendMessage(MENU_END);
  }
}

Fixed version (ground truth):
public void handleHelp(CommandSender cs){
  if (hasPermission(cs,Permission.SYSTEM_HELP)) {
    String base="String_Node_Str";
    String[] lines={"String_Node_Str" + WHITE + "String_Node_Str","String_Node_Str" + WHITE + "String_Node_Str","String_Node_Str" + WHITE + "String_Node_Str","String_Node_Str" + WHITE + "String_Node_Str","String_Node_Str" + WHITE + "String_Node_Str","String_Node_Str" + WHITE + "String_Node_Str","String_Node_Str" + WHITE + "String_Node_Str","String_Node_Str" + WHITE + "String_Node_Str","String_Node_Str" + WHITE + "String_Node_Str","String_Node_Str" + WHITE + "String_Node_Str"};
    cs.sendMessage("String_Node_Str" + GREEN + "String_Node_Str"+ WHITE+ "String_Node_Str");
    for (    String s : lines) {
      cs.sendMessage(base + GREEN + s);
    }
  }
}
Program: 101794
Project: 101794
Buggy source:
public void alert(User user,Level level,CheckType type){
  final String name=user.getName();
  List<String> messageArray=config.getLang().getAlert();
  for (int i=0; i < messageArray.size(); i++) {
    String message=messageArray.get(i);
    message=message.replaceAll("String_Node_Str",GOLD + name + GRAY);
    message=message.replaceAll("String_Node_Str",GOLD + CheckType.getName(type) + GRAY);
    message=message.replaceAll("String_Node_Str",level.getColor() + level.getName() + GRAY);
    messageArray.set(i,message);
  }
  Utilities.alert(messageArray);
  execute(user,level.getActions(),type);
}

Fixed version (ground truth):
public void alert(User user,Level level,CheckType type){
  ArrayList<String> messageArray=new ArrayList<String>();
  for (int i=0; i < alert.size(); i++) {
    String message=alert.get(i);
    message=message.replaceAll("String_Node_Str",GOLD + user.getName() + GRAY);
    message=message.replaceAll("String_Node_Str",GOLD + CheckType.getName(type) + GRAY);
    message=message.replaceAll("String_Node_Str",level.getColor() + level.getName() + GRAY);
    messageArray.add(message);
  }
  Utilities.alert(messageArray);
  execute(user,level.getActions(),type);
}
Program: 101795
Project: 101795
Buggy source:
public UserManager(Configuration conf){
  config=conf;
}

Fixed version (ground truth):
public UserManager(Configuration conf){
  config=conf;
  alert=config.getLang().getAlert();
}
Program: 101796
Project: 101796
Buggy source:
@EventHandler public void onInventoryOpen(InventoryOpenEvent event){
  getUserManager().getUser(event.getPlayer().getName()).setSnapshot(event.getInventory().getContents());
}

Fixed version (ground truth):
@EventHandler public void onInventoryOpen(InventoryOpenEvent event){
  if (event.getInventory().getType() != InventoryType.BEACON) {
    getUserManager().getUser(event.getPlayer().getName()).setSnapshot(event.getInventory().getContents());
  }
}
Program: 101797
Project: 101797
Buggy source:
public void restore(Inventory inventory){
  inventory.clear();
  for (  ItemStack is : inventorySnapshot) {
    if (is != null) {
      inventory.addItem(is);
    }
  }
}

Fixed version (ground truth):
public void restore(Inventory inventory){
  if (inventorySnapshot != null) {
    inventory.clear();
    for (    ItemStack is : inventorySnapshot) {
      if (is != null) {
        inventory.addItem(is);
      }
    }
  }
}
Program: 101798
Project: 101798
Buggy source:
/** 
 * Get the total bytes of the file (can only be used after running a version check or a normal run).
 */
public long getFileSize(){
  return totalSize;
}

Fixed version (ground truth):
/** 
 * Get the total bytes of the file (can only be used after running a version check or a normal run).
 */
public long getFileSize(){
  waitForThread();
  return totalSize;
}
Program: 101799
Project: 101799
Buggy source:
/** 
 * Get the version string latest file avaliable online.
 */
public String getLatestVersionString(){
  return versionTitle;
}

Fixed version (ground truth):
/** 
 * Get the version string latest file avaliable online.
 */
public String getLatestVersionString(){
  waitForThread();
  return versionTitle;
}
Program: 101800
Project: 101800
Buggy source:
/** 
 * Initialize the updater
 * @param plugin The plugin that is checking for an update.
 * @param slug The dev.bukkit.org slug of the project (http://dev.bukkit.org/server-mods/SLUG_IS_HERE)
 * @param file The file that the plugin is running from, get this by doing this.getFile() from within your main class.
 * @param type Specify the type of update this will be. See  {@link UpdateType}
 * @param announce True if the program should announce the progress of new updates in console
 */
public Updater(Plugin plugin,String slug,File file,UpdateType type,boolean announce){
  this.plugin=plugin;
  this.type=type;
  this.announce=announce;
  this.file=file;
  try {
    url=new URL(DBOUrl + slug + "String_Node_Str");
  }
 catch (  MalformedURLException ex) {
    plugin.getLogger().warning("String_Node_Str" + plugin.getDescription().getAuthors().get(0) + "String_Node_Str");
    plugin.getLogger().warning("String_Node_Str" + slug + "String_Node_Str");
    result=Updater.UpdateResult.FAIL_BADSLUG;
  }
  new Thread(new UpdateRunnable()).start();
}

Fixed version (ground truth):
/** 
 * Initialize the updater
 * @param plugin The plugin that is checking for an update.
 * @param slug The dev.bukkit.org slug of the project (http://dev.bukkit.org/server-mods/SLUG_IS_HERE)
 * @param file The file that the plugin is running from, get this by doing this.getFile() from within your main class.
 * @param type Specify the type of update this will be. See  {@link UpdateType}
 * @param announce True if the program should announce the progress of new updates in console
 */
public Updater(Plugin plugin,String slug,File file,UpdateType type,boolean announce){
  this.plugin=plugin;
  this.type=type;
  this.announce=announce;
  this.file=file;
  try {
    url=new URL(DBOUrl + slug + "String_Node_Str");
  }
 catch (  MalformedURLException ex) {
    plugin.getLogger().warning("String_Node_Str" + plugin.getDescription().getAuthors().get(0) + "String_Node_Str");
    plugin.getLogger().warning("String_Node_Str" + slug + "String_Node_Str");
    result=Updater.UpdateResult.FAIL_BADSLUG;
  }
  thread=new Thread(new UpdateRunnable());
  thread.start();
}
Program: 101801
Project: 101801
Buggy source:
/** 
 * Get the result of the update process.
 */
public Updater.UpdateResult getResult(){
  return result;
}

Fixed version (ground truth):
/** 
 * Get the result of the update process.
 */
public Updater.UpdateResult getResult(){
  waitForThread();
  return result;
}
Program: 101806
Project: 101806
Buggy source:
public boolean checkSwing(Player player,Block block){
  String name=player.getName();
  if (!isInstantBreakExempt(player)) {
    if (!player.getInventory().getItemInHand().containsEnchantment(Enchantment.DIG_SPEED) && !(player.getInventory().getItemInHand().getType() == Material.SHEARS && block.getType() == Material.LEAVES)) {
      if (blockPunches.get(name) != null && player.getGameMode() != GameMode.CREATIVE) {
        int i=blockPunches.get(name);
        if (i < magic.BLOCK_PUNCH_MIN) {
          return true;
        }
 else {
          blockPunches.put(name,0);
        }
      }
    }
  }
  return !justAnimated(player);
}

Fixed version (ground truth):
public boolean checkSwing(Player player,Block block){
  String name=player.getName();
  if (!isInstantBreakExempt(player)) {
    if (!player.getInventory().getItemInHand().containsEnchantment(Enchantment.DIG_SPEED) && !(player.getInventory().getItemInHand().getType() == Material.SHEARS && block.getType() == Material.LEAVES)) {
      if (blockPunches.get(name) != null && player.getGameMode() != GameMode.CREATIVE) {
        int i=blockPunches.get(name);
        if (i < magic.BLOCK_PUNCH_MIN) {
          return true;
        }
 else {
          blockPunches.put(name,0);
        }
      }
    }
  }
  return !justAnimated(player,block);
}
Program: 101807
Project: 101807
Buggy source:
public boolean justAnimated(Player player){
  if (player.getItemInHand().containsEnchantment(Enchantment.DIG_SPEED)) {
    return true;
  }
  String name=player.getName();
  if (animated.containsKey(name)) {
    long time=System.currentTimeMillis() - animated.get(name);
    animated.remove(player.getName());
    return time < magic.ANIMATION_MIN;
  }
 else {
    return false;
  }
}

Fixed version (ground truth):
private boolean justAnimated(Player player){
  String name=player.getName();
  if (animated.containsKey(name)) {
    long time=System.currentTimeMillis() - animated.get(name);
    animated.remove(player.getName());
    return time < magic.ANIMATION_MIN;
  }
 else {
    return false;
  }
}
Program: 101808
Project: 101808
Buggy source:
public static long calcSurvivalFastBreak(ItemStack tool,Material block){
  double bhardness=BlockHardness.getBlockHardness(block);
  double thardness=ToolHardness.getToolHardness(tool.getType());
  long enchantlvl=(long)tool.getEnchantmentLevel(Enchantment.DIG_SPEED);
  long result=(long)((long)Math.round((bhardness * thardness) * 0.10 * 10000));
  result+=150;
  if (enchantlvl > 0)   result/=enchantlvl * enchantlvl + 1L;
  if (result > 25000)   result=25000;
 else   if (result < 0)   result=0;
  return result;
}

Fixed version (ground truth):
public static long calcSurvivalFastBreak(ItemStack tool,Material block){
  if (isInstantBreak(block) || (tool.getType() == Material.SHEARS && block.getId() == Material.LEAVES.getId())) {
    return 0;
  }
  double bhardness=BlockHardness.getBlockHardness(block);
  double thardness=ToolHardness.getToolHardness(tool.getType());
  long enchantlvl=(long)tool.getEnchantmentLevel(Enchantment.DIG_SPEED);
  long result=(long)((long)Math.round((bhardness * thardness) * 0.10 * 10000));
  result+=150;
  if (enchantlvl > 0)   result/=enchantlvl * enchantlvl + 1L;
  if (result > 25000)   result=25000;
 else   if (result < 0)   result=0;
  return result;
}
Program: 101809
Project: 101809
Buggy source:
@EventHandler public void onInventoryClick(InventoryClickEvent event){
  if (event.getWhoClicked() instanceof Player) {
    Player player=(Player)event.getWhoClicked();
    if (checkManager.willCheck(player,CheckType.FAST_INVENTORY)) {
      if (backend.checkInventoryClicks(player)) {
        if (!config.silentMode()) {
          event.setCancelled(!config.silentMode());
          player.setHealth(0);
        }
        log("String_Node_Str",player,CheckType.FAST_INVENTORY);
      }
 else {
        decrease(player);
      }
    }
  }
  Anticheat.getManager().addEvent(event.getEventName(),event.getHandlers().getRegisteredListeners());
}

Fixed version (ground truth):
@EventHandler public void onInventoryClick(InventoryClickEvent event){
  if (event.getWhoClicked() instanceof Player) {
    Player player=(Player)event.getWhoClicked();
    if (checkManager.willCheck(player,CheckType.FAST_INVENTORY)) {
      if (backend.checkInventoryClicks(player)) {
        if (!config.silentMode()) {
          event.setCancelled(!config.silentMode());
          player.damage(9999);
        }
        log("String_Node_Str",player,CheckType.FAST_INVENTORY);
      }
 else {
        decrease(player);
      }
    }
  }
  Anticheat.getManager().addEvent(event.getEventName(),event.getHandlers().getRegisteredListeners());
}
Program: 101812
Project: 101812
Buggy source:
public CommentedConfiguration(){
  comments.put("String_Node_Str","String_Node_Str");
  comments.put("String_Node_Str","String_Node_Str");
  comments.put("String_Node_Str","String_Node_Str");
  comments.put("String_Node_Str","String_Node_Str");
  comments.put("String_Node_Str","String_Node_Str");
  comments.put("String_Node_Str","String_Node_Str");
  comments.put("String_Node_Str","String_Node_Str");
  comments.put("String_Node_Str","String_Node_Str");
  comments.put("String_Node_Str","String_Node_Str");
  comments.put("String_Node_Str","String_Node_Str");
  comments.put("String_Node_Str","String_Node_Str");
  comments.put("String_Node_Str","String_Node_Str");
  comments.put("String_Node_Str","String_Node_Str");
  comments.put("String_Node_Str","String_Node_Str");
  comments.put("String_Node_Str","String_Node_Str");
  comments.put("String_Node_Str","String_Node_Str");
  comments.put("String_Node_Str","String_Node_Str");
  comments.put("String_Node_Str","String_Node_Str");
  comments.put("String_Node_Str","String_Node_Str");
  comments.put("String_Node_Str","String_Node_Str");
  comments.put("String_Node_Str","String_Node_Str");
}

Fixed version (ground truth):
public CommentedConfiguration(){
  comments.put("String_Node_Str","String_Node_Str");
  comments.put("String_Node_Str","String_Node_Str");
  comments.put("String_Node_Str","String_Node_Str");
  comments.put("String_Node_Str","String_Node_Str");
  comments.put("String_Node_Str","String_Node_Str");
  comments.put("String_Node_Str","String_Node_Str");
  comments.put("String_Node_Str","String_Node_Str");
  comments.put("String_Node_Str","String_Node_Str");
  comments.put("String_Node_Str","String_Node_Str");
  comments.put("String_Node_Str","String_Node_Str");
  comments.put("String_Node_Str","String_Node_Str");
  comments.put("String_Node_Str","String_Node_Str");
  comments.put("String_Node_Str","String_Node_Str");
  comments.put("String_Node_Str","String_Node_Str");
  comments.put("String_Node_Str","String_Node_Str");
  comments.put("String_Node_Str","String_Node_Str");
  comments.put("String_Node_Str","String_Node_Str");
  comments.put("String_Node_Str","String_Node_Str");
  comments.put("String_Node_Str","String_Node_Str");
  comments.put("String_Node_Str","String_Node_Str");
}
Program: 101813
Project: 101813
Buggy source:
public boolean checkAscension(Player player,double y1,double y2){
  int max=magic.ASCENSION_COUNT_MAX;
  if (player.hasPotionEffect(PotionEffectType.JUMP)) {
    max+=12;
  }
  Block block=player.getLocation().getBlock();
  if (!isMovingExempt(player) && !Utilities.isInWater(player) && !Utilities.isClimbableBlock(player.getLocation().getBlock())&& !player.isInsideVehicle()) {
    String name=player.getName();
    if (y1 < y2) {
      if (!block.getRelative(BlockFace.NORTH).isLiquid() && !block.getRelative(BlockFace.SOUTH).isLiquid() && !block.getRelative(BlockFace.EAST).isLiquid()&& !block.getRelative(BlockFace.WEST).isLiquid()) {
        increment(player,ascensionCount,max);
        if (ascensionCount.get(name) >= max) {
          return true;
        }
      }
    }
 else {
      ascensionCount.put(name,0);
    }
  }
  return false;
}

Fixed version (ground truth):
public boolean checkAscension(Player player,double y1,double y2){
  int max=magic.ASCENSION_COUNT_MAX;
  if (player.hasPotionEffect(PotionEffectType.JUMP)) {
    max+=12;
  }
  Block block=player.getLocation().getBlock();
  if (!isMovingExempt(player) && !Utilities.isInWater(player) && !justBroke(player)&& !Utilities.isClimbableBlock(player.getLocation().getBlock())&& !player.isInsideVehicle()) {
    String name=player.getName();
    if (y1 < y2) {
      if (!block.getRelative(BlockFace.NORTH).isLiquid() && !block.getRelative(BlockFace.SOUTH).isLiquid() && !block.getRelative(BlockFace.EAST).isLiquid()&& !block.getRelative(BlockFace.WEST).isLiquid()) {
        increment(player,ascensionCount,max);
        if (ascensionCount.get(name) >= max) {
          return true;
        }
      }
    }
 else {
      ascensionCount.put(name,0);
    }
  }
  return false;
}
Program: 101814
Project: 101814
Buggy source:
public boolean checkNoFall(Player player,double y){
  String name=player.getName();
  if (player.getGameMode() != GameMode.CREATIVE && player.getVehicle() == null && !isMovingExempt(player) && !Utilities.isInWater(player)) {
    if (player.getFallDistance() == 0) {
      if (nofallViolation.get(name) == null) {
        nofallViolation.put(name,1);
      }
 else {
        nofallViolation.put(name,nofallViolation.get(player.getName()) + 1);
      }
      if (nofallViolation.get(name) >= magic.NOFALL_LIMIT) {
        nofallViolation.put(player.getName(),1);
        return true;
      }
 else {
        return false;
      }
    }
 else {
      nofallViolation.put(name,0);
      return false;
    }
  }
  return false;
}

Fixed version (ground truth):
public boolean checkNoFall(Player player,double y){
  String name=player.getName();
  if (player.getGameMode() != GameMode.CREATIVE && player.getVehicle() == null && !isMovingExempt(player) && !justPlaced(player) && !Utilities.isInWater(player)) {
    if (player.getFallDistance() == 0) {
      if (nofallViolation.get(name) == null) {
        nofallViolation.put(name,1);
      }
 else {
        nofallViolation.put(name,nofallViolation.get(player.getName()) + 1);
      }
      if (nofallViolation.get(name) >= magic.NOFALL_LIMIT) {
        nofallViolation.put(player.getName(),1);
        return true;
      }
 else {
        return false;
      }
    }
 else {
      nofallViolation.put(name,0);
      return false;
    }
  }
  return false;
}
Program: 101815
Project: 101815
Buggy source:
@Override public void onEnable(){
  manager=new AnticheatManager(this,getLogger());
  eventList.add(new PlayerListener());
  eventList.add(new BlockListener());
  eventList.add(new EntityListener());
  eventList.add(new VehicleListener());
  setupConfig();
  setupXray();
  setupEvents();
  setupCommands();
  setupUpdater();
  setupMetrics();
  restoreLevels();
  if (verbose) {
    getLogger().log(Level.INFO,"String_Node_Str");
  }
}

Fixed version (ground truth):
@Override public void onEnable(){
  manager=new AnticheatManager(this,getLogger());
  eventList.add(new PlayerListener());
  eventList.add(new BlockListener());
  eventList.add(new EntityListener());
  eventList.add(new VehicleListener());
  eventList.add(new InventoryListener());
  setupConfig();
  setupXray();
  setupEvents();
  setupCommands();
  setupUpdater();
  setupMetrics();
  restoreLevels();
  if (verbose) {
    getLogger().log(Level.INFO,"String_Node_Str");
  }
}
Program: 101818
Project: 101818
Buggy source:
public boolean increaseLevel(CheckType type){
  if (silentMode && type.getUses(name) % 4 != 0) {
    return false;
  }
 else {
    level++;
    if (level == med) {
      Anticheat.getManager().getUserManager().alertMed(this,type);
    }
 else     if (level == high) {
      Anticheat.getManager().getUserManager().alertHigh(this,type);
      level=high - 10;
    }
    return true;
  }
}

Fixed version (ground truth):
public boolean increaseLevel(CheckType type){
  if (getPlayer().isOnline()) {
    if (silentMode && type.getUses(name) % 4 != 0) {
      return false;
    }
 else {
      level++;
      if (level == med) {
        Anticheat.getManager().getUserManager().alertMed(this,type);
      }
 else       if (level == high) {
        Anticheat.getManager().getUserManager().alertHigh(this,type);
        level=high - 10;
      }
      return true;
    }
  }
 else {
    return false;
  }
}
Program: 101819
Project: 101819
Buggy source:
public boolean justStartedEating(Player player){
  if (startEat.containsKey(player.getName())) {
    long l=startEat.get(player.getName());
    startEat.remove(player.getName());
    return (System.currentTimeMillis() - l) < EAT_TIME_MIN;
  }
  return false;
}

Fixed version (ground truth):
public boolean justStartedEating(Player player){
  if (startEat.containsKey(player.getName())) {
    long l=startEat.get(player.getName());
    startEat.remove(player.getName());
    System.out.println(player.getName() + "String_Node_Str" + (System.currentTimeMillis() - l));
    return (System.currentTimeMillis() - l) < EAT_TIME_MIN;
  }
  return false;
}
Program: 101820
Project: 101820
Buggy source:
private boolean isDoing(Player player,Map<String,Long> map,double max){
  if (map.containsKey(player.getName())) {
    if (max != -1) {
      if ((map.get(player.getName()) / 1000) > max) {
        map.remove(player.getName());
        return false;
      }
 else {
        return true;
      }
    }
 else {
      if (map.get(player.getName()) < System.currentTimeMillis()) {
        map.remove(player.getName());
        return false;
      }
 else {
        return true;
      }
    }
  }
 else {
    return false;
  }
}

Fixed version (ground truth):
private boolean isDoing(Player player,Map<String,Long> map,double max){
  if (map.containsKey(player.getName())) {
    if (max != -1) {
      if (((System.currentTimeMillis() - map.get(player.getName())) / 1000) > max) {
        map.remove(player.getName());
        return false;
      }
 else {
        return true;
      }
    }
 else {
      if (map.get(player.getName()) < System.currentTimeMillis()) {
        map.remove(player.getName());
        return false;
      }
 else {
        return true;
      }
    }
  }
 else {
    return false;
  }
}
Program: 101822
Project: 101822
Buggy source:
public boolean checkFlight(Player player,Distance distance){
  if (distance.getYDifference() > 400) {
    return false;
  }
  String name=player.getName();
  int y1=(int)distance.fromY();
  int y2=(int)distance.toY();
  if ((y1 == y2 || y1 < y2) && !Utilities.isInWater(player) && !Utilities.canStand(player.getLocation().getBlock())&& Utilities.cantStandAt(player.getLocation().add(0,-1,0).getBlock())&& Utilities.cantStandAt(player.getLocation().add(0,-2,0).getBlock())) {
    int violation=flightViolation.containsKey(name) ? flightViolation.get(name) + 1 : 1;
    increment(player,flightViolation,violation);
    if (violation > FLIGHT_LIMIT) {
      return true;
    }
 else {
      return false;
    }
  }
 else {
    flightViolation.put(name,0);
    return false;
  }
}

Fixed version (ground truth):
public boolean checkFlight(Player player,Distance distance){
  if (distance.getYDifference() > 400) {
    return false;
  }
  String name=player.getName();
  int y1=(int)distance.fromY();
  int y2=(int)distance.toY();
  if (!isMovingExempt(player) && (y1 == y2 || y1 < y2) && !Utilities.isInWater(player)&& !Utilities.canStand(player.getLocation().getBlock())&& Utilities.cantStandAt(player.getLocation().add(0,-1,0).getBlock())&& Utilities.cantStandAt(player.getLocation().add(0,-2,0).getBlock())) {
    int violation=flightViolation.containsKey(name) ? flightViolation.get(name) + 1 : 1;
    increment(player,flightViolation,violation);
    if (violation > FLIGHT_LIMIT) {
      return true;
    }
 else {
      return false;
    }
  }
 else {
    flightViolation.put(name,0);
    return false;
  }
}
Program: 101823
Project: 101823
Buggy source:
public void logDamage(final Player player){
  int time=DAMAGE_TIME;
  if (player.getInventory().getItemInHand().getEnchantments().containsKey(Enchantment.KNOCKBACK)) {
    time=KNOCKBACK_DAMAGE_TIME;
  }
  logEvent(movingExempt,player,time);
}

Fixed version (ground truth):
public void logDamage(final Player player,int type){
  int time;
switch (type) {
case 1:
    time=DAMAGE_TIME;
  break;
case 2:
time=KNOCKBACK_DAMAGE_TIME;
break;
case 3:
time=EXPLOSION_DAMAGE_TIME;
break;
default :
time=DAMAGE_TIME;
break;
}
logEvent(movingExempt,player,time);
}
Program: 101824
Project: 101824
Buggy source:
@EventHandler public void onEntityRegainHealth(EntityRegainHealthEvent event){
  if (event.getEntity() instanceof Player && event.getRegainReason() == RegainReason.SATIATED) {
    Player player=(Player)event.getEntity();
    if (checkManager.willCheck(player,CheckType.FAST_HEAL)) {
      if (backend.justHealed(player)) {
        event.setCancelled(!config.silentMode());
        log("String_Node_Str",player,CheckType.FAST_HEAL);
      }
 else {
        decrease(player);
      }
    }
  }
}

Fixed version (ground truth):
@EventHandler public void onEntityRegainHealth(EntityRegainHealthEvent event){
  if (event.getEntity() instanceof Player && event.getRegainReason() == RegainReason.SATIATED) {
    Player player=(Player)event.getEntity();
    if (checkManager.willCheck(player,CheckType.FAST_HEAL)) {
      if (backend.justHealed(player)) {
        event.setCancelled(!config.silentMode());
        log("String_Node_Str",player,CheckType.FAST_HEAL);
        return;
      }
 else {
        decrease(player);
        backend.logHeal(player);
      }
    }
  }
}
Program: 101825
Project: 101825
Buggy source:
@EventHandler public void onFoodLevelChange(FoodLevelChangeEvent event){
  if (event.getEntity() instanceof Player) {
    Player player=(Player)event.getEntity();
    if (checkManager.willCheck(player,CheckType.FAST_EAT)) {
      if (backend.justStartedEating(player)) {
        event.setCancelled(!config.silentMode());
        log("String_Node_Str",player,CheckType.FAST_EAT);
      }
 else {
        decrease(player);
      }
    }
  }
}

Fixed version (ground truth):
@EventHandler public void onFoodLevelChange(FoodLevelChangeEvent event){
  if (event.getEntity() instanceof Player) {
    Player player=(Player)event.getEntity();
    if (checkManager.willCheck(player,CheckType.FAST_EAT)) {
      if (backend.justStartedEating(player)) {
        event.setCancelled(!config.silentMode());
        log("String_Node_Str",player,CheckType.FAST_EAT);
        return;
      }
 else {
        decrease(player);
        backend.logEatingStart(player);
      }
    }
  }
}
Program: 101826
Project: 101826
Buggy source:
@EventHandler public void onProjectileLaunch(ProjectileLaunchEvent event){
  if (event.getEntity().getShooter() instanceof Player) {
    Player player=(Player)event.getEntity().getShooter();
    if (event.getEntity() instanceof Arrow) {
      return;
    }
    if (checkManager.willCheck(player,CheckType.FAST_PROJECTILE)) {
      if (backend.justLaunched(player)) {
        event.setCancelled(!config.silentMode());
        log("String_Node_Str",player,CheckType.FAST_PROJECTILE);
      }
 else {
        backend.logProjectile(player,this);
      }
    }
  }
}

Fixed version (ground truth):
@EventHandler public void onProjectileLaunch(ProjectileLaunchEvent event){
  if (event.getEntity().getShooter() instanceof Player) {
    Player player=(Player)event.getEntity().getShooter();
    if (event.getEntity() instanceof Arrow) {
      return;
    }
    if (checkManager.willCheck(player,CheckType.FAST_PROJECTILE)) {
      backend.logProjectile(player,this);
    }
  }
}
Program: 101827
Project: 101827
Buggy source:
public static void alert(String[] message){
  for (  Player player : Bukkit.getOnlinePlayers()) {
    if (player.hasPermission("String_Node_Str"))     ;
    for (    String msg : message) {
      player.sendMessage(msg);
    }
  }
  if (Anticheat.getManager().getConfiguration().logConsole()) {
    for (    String msg : message) {
      Anticheat.getManager().log(msg);
    }
  }
}

Fixed version (ground truth):
public static void alert(String[] message){
  for (  Player player : Bukkit.getOnlinePlayers()) {
    for (    String msg : message) {
      if (player.hasPermission("String_Node_Str"))       player.sendMessage(msg);
    }
  }
  if (Anticheat.getManager().getConfiguration().logConsole()) {
    for (    String msg : message) {
      Anticheat.getManager().log(msg);
    }
  }
}
Program: 101828
Project: 101828
Buggy source:
@EventHandler public void onBlockBreak(BlockBreakEvent event){
  if (config.logXRay()) {
    Player p=event.getPlayer();
    String player=p.getName();
    if (checkManager.willCheck(p,CheckType.XRAY)) {
      Material m=event.getBlock().getType();
      if (m == Material.DIAMOND_ORE) {
        tracker.addDiamond(player);
      }
 else       if (m == Material.IRON_ORE) {
        tracker.addIron(player);
      }
 else       if (m == Material.COAL_ORE) {
        tracker.addCoal(player);
      }
 else       if (m == Material.GOLD_ORE) {
        tracker.addGold(player);
      }
 else       if (m == Material.LAPIS_ORE) {
        tracker.addLapis(player);
      }
 else       if (m == Material.REDSTONE_ORE) {
        tracker.addRedstone(player);
      }
 else       if (m == Material.GOLD_ORE) {
        tracker.addGold(player);
      }
 else {
        tracker.addBlock(player);
      }
      tracker.addTotal(player);
    }
  }
}

Fixed version (ground truth):
@EventHandler public void onBlockBreak(BlockBreakEvent event){
  if (config.logXRay()) {
    Player p=event.getPlayer();
    String player=p.getName();
    if (checkManager.willCheck(p,CheckType.XRAY)) {
      Material m=event.getBlock().getType();
      if (m == Material.DIAMOND_ORE) {
        tracker.addDiamond(player);
      }
 else       if (m == Material.IRON_ORE) {
        tracker.addIron(player);
      }
 else       if (m == Material.GOLD_ORE) {
        tracker.addGold(player);
      }
 else       if (m == Material.LAPIS_ORE) {
        tracker.addLapis(player);
      }
 else       if (m == Material.REDSTONE_ORE) {
        tracker.addRedstone(player);
      }
 else       if (m == Material.GOLD_ORE) {
        tracker.addGold(player);
      }
 else {
        tracker.addBlock(player);
      }
      tracker.addTotal(player);
    }
  }
}
Program: 101829
Project: 101829
Buggy source:
public XRayStats(String player,Map<String,Integer> diamond,Map<String,Integer> gold,Map<String,Integer> iron,Map<String,Integer> coal,Map<String,Integer> lapis,Map<String,Integer> redstone,Map<String,Integer> other,Map<String,Integer> total){
  if (total.get(player) != null) {
    t=total.get(player);
  }
  if (diamond.get(player) != null) {
    d=(diamond.get(player) / t) * DIVISOR;
  }
  if (gold.get(player) != null) {
    g=(gold.get(player) / t) * DIVISOR;
  }
  if (iron.get(player) != null) {
    i=(iron.get(player) / t) * DIVISOR;
  }
  if (coal.get(player) != null) {
    c=(coal.get(player) / t) * DIVISOR;
  }
  if (lapis.get(player) != null) {
    l=(lapis.get(player) / t) * DIVISOR;
  }
  if (redstone.get(player) != null) {
    r=(redstone.get(player) / t) * DIVISOR;
  }
  if (other.get(player) != null) {
    o=(other.get(player) / t) * DIVISOR;
  }
}

Fixed version (ground truth):
public XRayStats(String player,Map<String,Integer> diamond,Map<String,Integer> gold,Map<String,Integer> iron,Map<String,Integer> lapis,Map<String,Integer> redstone,Map<String,Integer> other,Map<String,Integer> total){
  if (total.get(player) != null) {
    t=total.get(player);
  }
  if (diamond.get(player) != null) {
    d=(diamond.get(player) / t) * DIVISOR;
  }
  if (gold.get(player) != null) {
    g=(gold.get(player) / t) * DIVISOR;
  }
  if (iron.get(player) != null) {
    i=(iron.get(player) / t) * DIVISOR;
  }
  if (lapis.get(player) != null) {
    l=(lapis.get(player) / t) * DIVISOR;
  }
  if (redstone.get(player) != null) {
    r=(redstone.get(player) / t) * DIVISOR;
  }
  if (other.get(player) != null) {
    o=(other.get(player) / t) * DIVISOR;
  }
}
Program: 101830
Project: 101830
Buggy source:
public void getStats(CommandSender cs,String player){
  XRayStats stats=new XRayStats(player,diamond,gold,iron,coal,lapis,redstone,block,totalblock);
  double total=stats.getOther();
  cs.sendMessage("String_Node_Str" + GREEN + "String_Node_Str"+ WHITE+ "String_Node_Str");
  cs.sendMessage(GRAY + "String_Node_Str" + WHITE+ player);
  cs.sendMessage(GRAY + "String_Node_Str" + WHITE+ stats.getTotal());
  calculate(cs,player,stats.getDiamond(),total,"String_Node_Str");
  calculate(cs,player,stats.getGold(),total,"String_Node_Str");
  calculate(cs,player,stats.getIron(),total,"String_Node_Str");
  calculate(cs,player,stats.getCoal(),total,"String_Node_Str");
  calculate(cs,player,stats.getLapis(),total,"String_Node_Str");
  calculate(cs,player,stats.getRedstone(),total,"String_Node_Str");
  cs.sendMessage(GRAY + "String_Node_Str" + WHITE+ round(stats.getOther())+ "String_Node_Str");
  cs.sendMessage("String_Node_Str");
}

Fixed version (ground truth):
public void getStats(CommandSender cs,String player){
  XRayStats stats=new XRayStats(player,diamond,gold,iron,lapis,redstone,block,totalblock);
  double total=stats.getOther();
  cs.sendMessage("String_Node_Str" + GREEN + "String_Node_Str"+ WHITE+ "String_Node_Str");
  cs.sendMessage(GRAY + "String_Node_Str" + WHITE+ player);
  cs.sendMessage(GRAY + "String_Node_Str" + WHITE+ stats.getTotal());
  calculate(cs,player,stats.getDiamond(),total,"String_Node_Str");
  calculate(cs,player,stats.getGold(),total,"String_Node_Str");
  calculate(cs,player,stats.getIron(),total,"String_Node_Str");
  calculate(cs,player,stats.getLapis(),total,"String_Node_Str");
  calculate(cs,player,stats.getRedstone(),total,"String_Node_Str");
  cs.sendMessage(GRAY + "String_Node_Str" + WHITE+ round(stats.getOther())+ "String_Node_Str");
  cs.sendMessage("String_Node_Str");
}
Program: 101831
Project: 101831
Buggy source:
public boolean hasAbnormal(String player){
  XRayStats stats=new XRayStats(player,diamond,gold,iron,coal,lapis,redstone,block,totalblock);
  double total=stats.getOther();
  return calculate(player,stats.getDiamond(),total) || calculate(player,stats.getGold(),total) || calculate(player,stats.getIron(),total)|| calculate(player,stats.getCoal(),total)|| calculate(player,stats.getLapis(),total)|| calculate(player,stats.getRedstone(),total);
}

Fixed version (ground truth):
public boolean hasAbnormal(String player){
  XRayStats stats=new XRayStats(player,diamond,gold,iron,lapis,redstone,block,totalblock);
  double total=stats.getOther();
  return calculate(player,stats.getDiamond(),total) || calculate(player,stats.getGold(),total) || calculate(player,stats.getIron(),total)|| calculate(player,stats.getLapis(),total)|| calculate(player,stats.getRedstone(),total);
}
Program: 101832
Project: 101832
Buggy source:
public void reset(String player){
  totalblock.put(player,1);
  diamond.put(player,0);
  iron.put(player,0);
  gold.put(player,0);
  coal.put(player,0);
  redstone.put(player,0);
  lapis.put(player,0);
  totalblock.put(player,0);
}

Fixed version (ground truth):
public void reset(String player){
  totalblock.put(player,1);
  diamond.put(player,0);
  iron.put(player,0);
  gold.put(player,0);
  redstone.put(player,0);
  lapis.put(player,0);
  totalblock.put(player,0);
}
Program: 101833
Project: 101833
Buggy source:
@EventHandler public void onPlayerInteract(PlayerInteractEvent event){
  Player player=event.getPlayer();
  Block playerClick=player.getTargetBlock(Utilities.getNonSolid(),5);
  PlayerInventory inv=player.getInventory();
  if (event.getAction() == Action.RIGHT_CLICK_AIR || event.getAction() == Action.RIGHT_CLICK_BLOCK) {
    Material m=inv.getItemInHand().getType();
    if (m == Material.BOW) {
      backend.logBowWindUp(player);
    }
 else     if (Utilities.isFood(m)) {
      backend.logEatingStart(player);
    }
  }
  Block block=event.getClickedBlock();
  if (block != null) {
    Distance distance=new Distance(player.getLocation(),block.getLocation());
    backend.checkLongReachBlock(player,distance.getXDifference(),distance.getYDifference(),distance.getZDifference());
  }
}

Fixed version (ground truth):
@EventHandler public void onPlayerInteract(PlayerInteractEvent event){
  Player player=event.getPlayer();
  PlayerInventory inv=player.getInventory();
  if (event.getAction() == Action.RIGHT_CLICK_AIR || event.getAction() == Action.RIGHT_CLICK_BLOCK) {
    Material m=inv.getItemInHand().getType();
    if (m == Material.BOW) {
      backend.logBowWindUp(player);
    }
 else     if (Utilities.isFood(m)) {
      backend.logEatingStart(player);
    }
  }
  Block block=event.getClickedBlock();
  if (block != null) {
    Distance distance=new Distance(player.getLocation(),block.getLocation());
    backend.checkLongReachBlock(player,distance.getXDifference(),distance.getYDifference(),distance.getZDifference());
  }
}
Program: 101834
Project: 101834
Buggy source:
public static void alert(String[] message){
  for (  String msg : message) {
    Bukkit.broadcast(msg,"String_Node_Str");
  }
  if (Anticheat.getManager().getConfiguration().logConsole()) {
    for (    String msg : message) {
      Anticheat.getManager().log(msg);
    }
  }
}

Fixed version (ground truth):
public static void alert(String[] message){
  for (  Player player : Bukkit.getOnlinePlayers()) {
    if (player.hasPermission("String_Node_Str"))     ;
    for (    String msg : message) {
      player.sendMessage(msg);
    }
  }
  if (Anticheat.getManager().getConfiguration().logConsole()) {
    for (    String msg : message) {
      Anticheat.getManager().log(msg);
    }
  }
}
Program: 101835
Project: 101835
Buggy source:
public boolean checkVisuals(Player player,Block targetBlock,Block playerClick){
  if (!Utilities.isInteractable(targetBlock.getType())) {
    return false;
  }
  double x=targetBlock.getX() - playerClick.getX() * ((targetBlock.getX() - playerClick.getX() * 1) < 0 ? -1 : 1);
  double y=targetBlock.getY() - playerClick.getY() * ((targetBlock.getY() - playerClick.getY() * 1) < 0 ? -1 : 1);
  double z=targetBlock.getZ() - playerClick.getZ() * ((targetBlock.getZ() - playerClick.getZ() * 1) < 0 ? -1 : 1);
  return x >= VISUALS_MAXOFFSET || y >= VISUALS_MAXOFFSET || z >= VISUALS_MAXOFFSET;
}

Fixed version (ground truth):
public boolean checkVisuals(Player player,Block targetBlock,Block playerClick){
  if (!Utilities.isInteractable(targetBlock.getType())) {
    return false;
  }
  if (playerClick.getType() == Material.TRAP_DOOR) {
    Location x1=new Location(targetBlock.getWorld(),playerClick.getX() - 1,playerClick.getY(),playerClick.getZ());
    Location x2=new Location(targetBlock.getWorld(),playerClick.getX() + 1,playerClick.getY(),playerClick.getZ());
    Location y1=new Location(targetBlock.getWorld(),playerClick.getX(),playerClick.getY() - 1,playerClick.getZ());
    Location y2=new Location(targetBlock.getWorld(),playerClick.getX(),playerClick.getY() + 1,playerClick.getZ());
    Location z1=new Location(targetBlock.getWorld(),playerClick.getX(),playerClick.getY(),playerClick.getZ() - 1);
    Location z2=new Location(targetBlock.getWorld(),playerClick.getX(),playerClick.getY(),playerClick.getZ() + 1);
    if (x1.equals(targetBlock.getLocation()) || x2.equals(targetBlock.getLocation()) || y1.equals(targetBlock.getLocation())|| y2.equals(targetBlock.getLocation())|| z1.equals(targetBlock.getLocation())|| z2.equals(targetBlock.getLocation())) {
      System.out.println((int)playerClick.getData());
      String dir=Utilities.getCardinalDirection(player);
      int minimum=0;
      if (dir.equalsIgnoreCase("String_Node_Str")) {
        minimum=0;
      }
      if (dir.equalsIgnoreCase("String_Node_Str")) {
        minimum=1;
      }
      if (dir.equalsIgnoreCase("String_Node_Str")) {
        minimum=2;
      }
      if (dir.equalsIgnoreCase("String_Node_Str")) {
        minimum=3;
      }
      if ((int)playerClick.getData() == minimum)       return true;
      if ((int)playerClick.getData() == minimum + 4 && (playerClick.getLocation().distance(player.getLocation())) < 2)       return false;
    }
  }
  double x=targetBlock.getX() - playerClick.getX() * ((targetBlock.getX() - playerClick.getX() * 1) < 0 ? -1 : 1);
  double y=targetBlock.getY() - playerClick.getY() * ((targetBlock.getY() - playerClick.getY() * 1) < 0 ? -1 : 1);
  double z=targetBlock.getZ() - playerClick.getZ() * ((targetBlock.getZ() - playerClick.getZ() * 1) < 0 ? -1 : 1);
  return x >= VISUALS_MAXOFFSET || y >= VISUALS_MAXOFFSET || z >= VISUALS_MAXOFFSET;
}
Program: 101836
Project: 101836
Buggy source:
public boolean checkVisuals(Player player,Block targetBlock,Block playerClick){
  if (isInteracting(player)) {
    return false;
  }
  double x=targetBlock.getX() - playerClick.getX() * ((targetBlock.getX() - playerClick.getX() * 1) < 0 ? -1 : 1);
  double y=targetBlock.getY() - playerClick.getY() * ((targetBlock.getY() - playerClick.getY() * 1) < 0 ? -1 : 1);
  double z=targetBlock.getZ() - playerClick.getZ() * ((targetBlock.getZ() - playerClick.getZ() * 1) < 0 ? -1 : 1);
  return x >= VISUALS_MAXOFFSET || y >= VISUALS_MAXOFFSET || z >= VISUALS_MAXOFFSET;
}

Fixed version (ground truth):
public boolean checkVisuals(Player player,Block targetBlock,Block playerClick){
  if (isInteracting(player) || playerClick.isLiquid()) {
    return false;
  }
  double x=targetBlock.getX() - playerClick.getX() * ((targetBlock.getX() - playerClick.getX() * 1) < 0 ? -1 : 1);
  double y=targetBlock.getY() - playerClick.getY() * ((targetBlock.getY() - playerClick.getY() * 1) < 0 ? -1 : 1);
  double z=targetBlock.getZ() - playerClick.getZ() * ((targetBlock.getZ() - playerClick.getZ() * 1) < 0 ? -1 : 1);
  return x >= VISUALS_MAXOFFSET || y >= VISUALS_MAXOFFSET || z >= VISUALS_MAXOFFSET;
}