nus-yam/ex-repair huggingface dataset:
Program: 41972
Project: 41972
Buggy source:
@EventHandler(priority=EventPriority.HIGH) public void onPlayerMove(PlayerMoveEvent event){
  IPlayer player=plugin.wrapPlayer(event.getPlayer());
  if (manager.isPlotWorld(player) && !player.hasPermission(PermissionNames.ADMIN_BYPASSDENY)) {
    ILocation to=new ILocation(player.getWorld(),BukkitUtil.locationToVector(event.getTo()));
    Plot plot=manager.getPlot(to);
    if (plot != null && plot.isDenied(player.getUniqueId())) {
      event.setTo(event.getFrom());
    }
  }
}

Fixed version (ground truth):
@EventHandler(priority=EventPriority.HIGH) public void onPlayerMove(PlayerMoveEvent event){
  IPlayer player=plugin.wrapPlayer(event.getPlayer());
  if (manager.isPlotWorld(player) && !player.hasPermission(PermissionNames.ADMIN_BYPASSDENY)) {
    Location to=new Location(player.getWorld(),BukkitUtil.locationToVector(event.getTo()));
    Plot plot=manager.getPlot(to);
    if (plot != null && plot.isDenied(player.getUniqueId())) {
      event.setTo(event.getFrom());
    }
  }
}
Program: 41973
Project: 41973
Buggy source:
@EventHandler(priority=EventPriority.NORMAL,ignoreCancelled=true) public void onBlockPistonExtend(BlockPistonExtendEvent event){
  BukkitWorld world=BukkitUtil.adapt(event.getBlock().getWorld());
  if (manager.isPlotWorld(world)) {
    BlockFace face=event.getDirection();
    for (    Block block : event.getBlocks()) {
      PlotId id=manager.getPlotId(new ILocation(world,BukkitUtil.locationToVector(block.getLocation().add(face.getModX(),face.getModY(),face.getModZ()))));
      if (id == null) {
        event.setCancelled(true);
      }
    }
  }
}

Fixed version (ground truth):
@EventHandler(priority=EventPriority.NORMAL,ignoreCancelled=true) public void onBlockPistonExtend(BlockPistonExtendEvent event){
  BukkitWorld world=BukkitUtil.adapt(event.getBlock().getWorld());
  if (manager.isPlotWorld(world)) {
    BlockFace face=event.getDirection();
    for (    Block block : event.getBlocks()) {
      PlotId id=manager.getPlotId(new Location(world,BukkitUtil.locationToVector(block.getLocation().add(face.getModX(),face.getModY(),face.getModZ()))));
      if (id == null) {
        event.setCancelled(true);
      }
    }
  }
}
Program: 41974
Project: 41974
Buggy source:
@EventHandler(priority=EventPriority.HIGH,ignoreCancelled=true) public void onBlockBreak(BlockBreakEvent event){
  IPlayer player=plugin.wrapPlayer(event.getPlayer());
  Location bloc=event.getBlock().getLocation();
  ILocation location=new ILocation(player.getWorld(),bloc.getX(),bloc.getY(),bloc.getZ());
  if (manager.isPlotWorld(location)) {
    if (player.hasPermission(PermissionNames.ADMIN_BUILDANYWHERE)) {
      return;
    }
    Plot plot=manager.getPlot(location);
    if (plot == null || !plot.isAllowed(player.getUniqueId())) {
      player.sendMessage(api.C("String_Node_Str"));
      event.setCancelled(true);
    }
 else     if (api.isPlotLocked(plot)) {
      player.sendMessage(api.C("String_Node_Str"));
      event.setCancelled(true);
    }
 else {
      plot.resetExpire(manager.getMap(location).getDaysToExpiration());
    }
  }
}

Fixed version (ground truth):
@EventHandler(priority=EventPriority.HIGH,ignoreCancelled=true) public void onBlockBreak(BlockBreakEvent event){
  IPlayer player=plugin.wrapPlayer(event.getPlayer());
  org.bukkit.Location bloc=event.getBlock().getLocation();
  Location location=new Location(player.getWorld(),bloc.getX(),bloc.getY(),bloc.getZ());
  if (manager.isPlotWorld(location)) {
    if (player.hasPermission(PermissionNames.ADMIN_BUILDANYWHERE)) {
      return;
    }
    Plot plot=manager.getPlot(location);
    if (plot == null || !plot.isAllowed(player.getUniqueId())) {
      player.sendMessage(api.C("String_Node_Str"));
      event.setCancelled(true);
    }
 else     if (api.isPlotLocked(plot)) {
      player.sendMessage(api.C("String_Node_Str"));
      event.setCancelled(true);
    }
 else {
      plot.resetExpire(manager.getMap(location).getDaysToExpiration());
    }
  }
}
Program: 41975
Project: 41975
Buggy source:
@EventHandler(priority=EventPriority.HIGH,ignoreCancelled=true) public void onStructureGrow(StructureGrowEvent event){
  BukkitWorld world=new BukkitWorld(event.getWorld());
  if (manager.isPlotWorld(world)) {
    for (int i=0; i < event.getBlocks().size(); i++) {
      PlotId id=manager.getPlotId(new ILocation(world,BukkitUtil.locationToVector(event.getBlocks().get(i).getLocation())));
      if (id == null) {
        event.getBlocks().remove(i);
        i--;
      }
    }
  }
}

Fixed version (ground truth):
@EventHandler(priority=EventPriority.HIGH,ignoreCancelled=true) public void onStructureGrow(StructureGrowEvent event){
  BukkitWorld world=new BukkitWorld(event.getWorld());
  if (manager.isPlotWorld(world)) {
    for (int i=0; i < event.getBlocks().size(); i++) {
      PlotId id=manager.getPlotId(new Location(world,BukkitUtil.locationToVector(event.getBlocks().get(i).getLocation())));
      if (id == null) {
        event.getBlocks().remove(i);
        i--;
      }
    }
  }
}
Program: 41976
Project: 41976
Buggy source:
@EventHandler(priority=EventPriority.HIGHEST) public void onSignEdit(SignChangeEvent event){
  IPlayer player=plugin.wrapPlayer(event.getPlayer());
  ILocation location=new ILocation(player.getWorld(),event.getBlock().getX(),event.getBlock().getY(),event.getBlock().getZ());
  if (manager.isPlotWorld(location)) {
    Plot plot=manager.getPlot(location);
    if (plot == null || !plot.isAllowed(player.getUniqueId())) {
      if (!player.hasPermission(PermissionNames.ADMIN_BUILDANYWHERE)) {
        player.sendMessage(api.C("String_Node_Str"));
        event.setCancelled(true);
      }
    }
 else     if (api.isPlotLocked(plot)) {
      player.sendMessage(api.C("String_Node_Str"));
      event.setCancelled(true);
    }
 else {
      plot.resetExpire(manager.getMap(location).getDaysToExpiration());
    }
  }
}

Fixed version (ground truth):
@EventHandler(priority=EventPriority.HIGHEST) public void onSignEdit(SignChangeEvent event){
  IPlayer player=plugin.wrapPlayer(event.getPlayer());
  Location location=new Location(player.getWorld(),event.getBlock().getX(),event.getBlock().getY(),event.getBlock().getZ());
  if (manager.isPlotWorld(location)) {
    Plot plot=manager.getPlot(location);
    if (plot == null || !plot.isAllowed(player.getUniqueId())) {
      if (!player.hasPermission(PermissionNames.ADMIN_BUILDANYWHERE)) {
        player.sendMessage(api.C("String_Node_Str"));
        event.setCancelled(true);
      }
    }
 else     if (api.isPlotLocked(plot)) {
      player.sendMessage(api.C("String_Node_Str"));
      event.setCancelled(true);
    }
 else {
      plot.resetExpire(manager.getMap(location).getDaysToExpiration());
    }
  }
}
Program: 41977
Project: 41977
Buggy source:
@EventHandler(priority=EventPriority.HIGH) public void onBlockPlace(BlockPlaceEvent event){
  IPlayer player=plugin.wrapPlayer(event.getPlayer());
  Location bloc=event.getBlockPlaced().getLocation();
  ILocation location=new ILocation(player.getWorld(),bloc.getX(),bloc.getY(),bloc.getZ());
  if (manager.isPlotWorld(location)) {
    Plot plot=manager.getPlot(location);
    if (plot == null || !plot.isAllowed(player.getUniqueId())) {
      if (!player.hasPermission(PermissionNames.ADMIN_BUILDANYWHERE)) {
        player.sendMessage(api.C("String_Node_Str"));
        event.setCancelled(true);
      }
    }
 else     if (api.isPlotLocked(plot)) {
      player.sendMessage(api.C("String_Node_Str"));
      event.setCancelled(true);
    }
 else {
      plot.resetExpire(manager.getMap(location).getDaysToExpiration());
    }
  }
}

Fixed version (ground truth):
@EventHandler(priority=EventPriority.HIGH) public void onBlockPlace(BlockPlaceEvent event){
  IPlayer player=plugin.wrapPlayer(event.getPlayer());
  org.bukkit.Location bloc=event.getBlockPlaced().getLocation();
  Location location=new Location(player.getWorld(),bloc.getX(),bloc.getY(),bloc.getZ());
  if (manager.isPlotWorld(location)) {
    Plot plot=manager.getPlot(location);
    if (plot == null || !plot.isAllowed(player.getUniqueId())) {
      if (!player.hasPermission(PermissionNames.ADMIN_BUILDANYWHERE)) {
        player.sendMessage(api.C("String_Node_Str"));
        event.setCancelled(true);
      }
    }
 else     if (api.isPlotLocked(plot)) {
      player.sendMessage(api.C("String_Node_Str"));
      event.setCancelled(true);
    }
 else {
      plot.resetExpire(manager.getMap(location).getDaysToExpiration());
    }
  }
}
Program: 41978
Project: 41978
Buggy source:
@EventHandler(priority=EventPriority.HIGH,ignoreCancelled=true) public void onBucketFillEvent(PlayerBucketFillEvent event){
  IPlayer player=plugin.wrapPlayer(event.getPlayer());
  Location bloc=event.getBlockClicked().getLocation();
  ILocation location=new ILocation(player.getWorld(),bloc.getX(),bloc.getY(),bloc.getZ());
  if (manager.isPlotWorld(location) && !player.hasPermission(PermissionNames.ADMIN_BUILDANYWHERE)) {
    Plot plot=manager.getPlot(location);
    if (plot == null) {
      player.sendMessage(api.C("String_Node_Str"));
      event.setCancelled(true);
    }
 else     if (!plot.isAllowed(player.getUniqueId())) {
      if (api.isPlotLocked(plot)) {
        player.sendMessage(api.C("String_Node_Str"));
        event.setCancelled(true);
      }
 else {
        player.sendMessage(api.C("String_Node_Str"));
        event.setCancelled(true);
      }
    }
  }
}

Fixed version (ground truth):
@EventHandler(priority=EventPriority.HIGH,ignoreCancelled=true) public void onBucketFillEvent(PlayerBucketFillEvent event){
  IPlayer player=plugin.wrapPlayer(event.getPlayer());
  org.bukkit.Location bloc=event.getBlockClicked().getLocation();
  Location location=new Location(player.getWorld(),bloc.getX(),bloc.getY(),bloc.getZ());
  if (manager.isPlotWorld(location) && !player.hasPermission(PermissionNames.ADMIN_BUILDANYWHERE)) {
    Plot plot=manager.getPlot(location);
    if (plot == null) {
      player.sendMessage(api.C("String_Node_Str"));
      event.setCancelled(true);
    }
 else     if (!plot.isAllowed(player.getUniqueId())) {
      if (api.isPlotLocked(plot)) {
        player.sendMessage(api.C("String_Node_Str"));
        event.setCancelled(true);
      }
 else {
        player.sendMessage(api.C("String_Node_Str"));
        event.setCancelled(true);
      }
    }
  }
}
Program: 41979
Project: 41979
Buggy source:
@EventHandler(priority=EventPriority.NORMAL,ignoreCancelled=true) public void onBlockPistonRetract(BlockPistonRetractEvent event){
  BukkitWorld world=BukkitUtil.adapt(event.getBlock().getWorld());
  if (manager.isPlotWorld(world)) {
    List<Block> blocks=event.getBlocks();
    for (    Block moved : blocks) {
      PlotId id=manager.getPlotId(new ILocation(world,BukkitUtil.locationToVector(moved.getLocation())));
      if (id == null) {
        event.setCancelled(true);
      }
    }
  }
}

Fixed version (ground truth):
@EventHandler(priority=EventPriority.NORMAL,ignoreCancelled=true) public void onBlockPistonRetract(BlockPistonRetractEvent event){
  BukkitWorld world=BukkitUtil.adapt(event.getBlock().getWorld());
  if (manager.isPlotWorld(world)) {
    List<Block> blocks=event.getBlocks();
    for (    Block moved : blocks) {
      PlotId id=manager.getPlotId(new Location(world,BukkitUtil.locationToVector(moved.getLocation())));
      if (id == null) {
        event.setCancelled(true);
      }
    }
  }
}
Program: 41980
Project: 41980
Buggy source:
@EventHandler(priority=EventPriority.NORMAL,ignoreCancelled=true) public void onHangingPlace(HangingPlaceEvent event){
  IPlayer player=plugin.wrapPlayer(event.getPlayer());
  ILocation location=new ILocation(player.getWorld(),BukkitUtil.locationToVector(event.getBlock().getLocation()));
  if (manager.isPlotWorld(location.getWorld())) {
    Plot plot=manager.getPlot(location);
    boolean canBuild=!player.hasPermission(PermissionNames.ADMIN_BUILDANYWHERE);
    if (plot == null || !plot.isAllowed(player.getUniqueId())) {
      if (canBuild) {
        player.sendMessage(api.C("String_Node_Str"));
        event.setCancelled(true);
      }
    }
 else {
      if (api.isPlotLocked(plot)) {
        player.sendMessage(api.C("String_Node_Str"));
        event.setCancelled(true);
      }
      plot.resetExpire(manager.getMap(location).getDaysToExpiration());
    }
  }
}

Fixed version (ground truth):
@EventHandler(priority=EventPriority.NORMAL,ignoreCancelled=true) public void onHangingPlace(HangingPlaceEvent event){
  IPlayer player=plugin.wrapPlayer(event.getPlayer());
  Location location=new Location(player.getWorld(),BukkitUtil.locationToVector(event.getBlock().getLocation()));
  if (manager.isPlotWorld(location.getWorld())) {
    Plot plot=manager.getPlot(location);
    boolean canBuild=!player.hasPermission(PermissionNames.ADMIN_BUILDANYWHERE);
    if (plot == null || !plot.isAllowed(player.getUniqueId())) {
      if (canBuild) {
        player.sendMessage(api.C("String_Node_Str"));
        event.setCancelled(true);
      }
    }
 else {
      if (api.isPlotLocked(plot)) {
        player.sendMessage(api.C("String_Node_Str"));
        event.setCancelled(true);
      }
      plot.resetExpire(manager.getMap(location).getDaysToExpiration());
    }
  }
}
Program: 41982
Project: 41982
Buggy source:
@EventHandler(priority=EventPriority.HIGH,ignoreCancelled=true) public void onBucketEmptyEvent(PlayerBucketEmptyEvent event){
  IPlayer player=plugin.wrapPlayer(event.getPlayer());
  ILocation location=new ILocation(player.getWorld(),BukkitUtil.locationToVector(event.getBlockClicked().getLocation()));
  if (!player.hasPermission(PermissionNames.ADMIN_BUILDANYWHERE) && manager.isPlotWorld(location)) {
    Plot plot=manager.getPlot(location.add(event.getBlockFace().getModX(),event.getBlockFace().getModY(),event.getBlockFace().getModZ()));
    if (plot == null) {
      player.sendMessage(api.C("String_Node_Str"));
      event.setCancelled(true);
    }
 else     if (!plot.isAllowed(player.getUniqueId())) {
      if (api.isPlotLocked(plot)) {
        player.sendMessage(api.C("String_Node_Str"));
        event.setCancelled(true);
      }
 else {
        player.sendMessage(api.C("String_Node_Str"));
        event.setCancelled(true);
      }
    }
  }
}

Fixed version (ground truth):
@EventHandler(priority=EventPriority.HIGH,ignoreCancelled=true) public void onBucketEmptyEvent(PlayerBucketEmptyEvent event){
  IPlayer player=plugin.wrapPlayer(event.getPlayer());
  Location location=new Location(player.getWorld(),BukkitUtil.locationToVector(event.getBlockClicked().getLocation()));
  if (!player.hasPermission(PermissionNames.ADMIN_BUILDANYWHERE) && manager.isPlotWorld(location)) {
    Plot plot=manager.getPlot(location.add(event.getBlockFace().getModX(),event.getBlockFace().getModY(),event.getBlockFace().getModZ()));
    if (plot == null) {
      player.sendMessage(api.C("String_Node_Str"));
      event.setCancelled(true);
    }
 else     if (!plot.isAllowed(player.getUniqueId())) {
      if (api.isPlotLocked(plot)) {
        player.sendMessage(api.C("String_Node_Str"));
        event.setCancelled(true);
      }
 else {
        player.sendMessage(api.C("String_Node_Str"));
        event.setCancelled(true);
      }
    }
  }
}
Program: 41983
Project: 41983
Buggy source:
@EventHandler(priority=EventPriority.HIGH,ignoreCancelled=true) public void onPlayerInteractEntity(PlayerInteractEntityEvent event){
  IPlayer player=plugin.wrapPlayer(event.getPlayer());
  Location clickLoc=event.getRightClicked().getLocation();
  ILocation location=new ILocation(player.getWorld(),clickLoc.getX(),clickLoc.getY(),clickLoc.getZ());
  if (manager.isPlotWorld(location)) {
    if (event.getRightClicked().hasMetadata("String_Node_Str") && event.getRightClicked().getMetadata("String_Node_Str").get(0).asBoolean()) {
      return;
    }
    boolean cannotBuildAnywhere=!player.hasPermission(PermissionNames.ADMIN_BUILDANYWHERE);
    Plot plot=manager.getPlot(location);
    if (plot == null) {
      if (cannotBuildAnywhere) {
        player.sendMessage(api.C("String_Node_Str"));
        event.setCancelled(true);
      }
    }
 else     if (plot.isAllowed(player.getUniqueId())) {
      plot.resetExpire(manager.getMap(location).getDaysToExpiration());
    }
 else {
      player.sendMessage(api.C("String_Node_Str"));
      event.setCancelled(true);
    }
  }
}

Fixed version (ground truth):
@EventHandler(priority=EventPriority.HIGH,ignoreCancelled=true) public void onPlayerInteractEntity(PlayerInteractEntityEvent event){
  IPlayer player=plugin.wrapPlayer(event.getPlayer());
  org.bukkit.Location clickLoc=event.getRightClicked().getLocation();
  Location location=new Location(player.getWorld(),clickLoc.getX(),clickLoc.getY(),clickLoc.getZ());
  if (manager.isPlotWorld(location)) {
    if (event.getRightClicked().hasMetadata("String_Node_Str") && event.getRightClicked().getMetadata("String_Node_Str").get(0).asBoolean()) {
      return;
    }
    boolean cannotBuildAnywhere=!player.hasPermission(PermissionNames.ADMIN_BUILDANYWHERE);
    Plot plot=manager.getPlot(location);
    if (plot == null) {
      if (cannotBuildAnywhere) {
        player.sendMessage(api.C("String_Node_Str"));
        event.setCancelled(true);
      }
    }
 else     if (plot.isAllowed(player.getUniqueId())) {
      plot.resetExpire(manager.getMap(location).getDaysToExpiration());
    }
 else {
      player.sendMessage(api.C("String_Node_Str"));
      event.setCancelled(true);
    }
  }
}
Program: 41984
Project: 41984
Buggy source:
@EventHandler public void onArmorStand(PlayerArmorStandManipulateEvent event){
  IPlayer player=plugin.wrapPlayer(event.getPlayer());
  ILocation location=new ILocation(player.getWorld(),BukkitUtil.locationToVector(event.getRightClicked().getLocation()));
  if (manager.isPlotWorld(location)) {
    boolean cannotBuildAnywhere=!player.hasPermission(PermissionNames.ADMIN_BUILDANYWHERE);
    Plot plot=manager.getPlot(location);
    if (plot == null) {
      if (cannotBuildAnywhere) {
        player.sendMessage(api.C("String_Node_Str"));
        event.setCancelled(true);
      }
    }
 else     if (plot.isAllowed(player.getUniqueId())) {
      plot.resetExpire(manager.getMap(location).getDaysToExpiration());
    }
 else {
      player.sendMessage(api.C("String_Node_Str"));
      event.setCancelled(true);
    }
  }
}

Fixed version (ground truth):
@EventHandler public void onArmorStand(PlayerArmorStandManipulateEvent event){
  IPlayer player=plugin.wrapPlayer(event.getPlayer());
  Location location=new Location(player.getWorld(),BukkitUtil.locationToVector(event.getRightClicked().getLocation()));
  if (manager.isPlotWorld(location)) {
    boolean cannotBuildAnywhere=!player.hasPermission(PermissionNames.ADMIN_BUILDANYWHERE);
    Plot plot=manager.getPlot(location);
    if (plot == null) {
      if (cannotBuildAnywhere) {
        player.sendMessage(api.C("String_Node_Str"));
        event.setCancelled(true);
      }
    }
 else     if (plot.isAllowed(player.getUniqueId())) {
      plot.resetExpire(manager.getMap(location).getDaysToExpiration());
    }
 else {
      player.sendMessage(api.C("String_Node_Str"));
      event.setCancelled(true);
    }
  }
}
Program: 41985
Project: 41985
Buggy source:
@EventHandler(ignoreCancelled=true) public void onSandCannon(EntityChangeBlockEvent event){
  BukkitEntity entity=new BukkitEntity(event.getEntity());
  if (manager.isPlotWorld(entity) && event.getEntityType().equals(EntityType.FALLING_BLOCK)) {
    if (event.getTo().equals(Material.AIR)) {
      entity.setMetadata("String_Node_Str",new FixedMetadataValue(plugin,event.getBlock().getLocation()));
    }
 else {
      List<MetadataValue> values=entity.getMetadata("String_Node_Str");
      if (!values.isEmpty()) {
        Location spawn=(Location)(values.get(0).value());
        Location createdNew=event.getBlock().getLocation();
        if (spawn.getBlockX() != createdNew.getBlockX() || spawn.getBlockZ() != createdNew.getBlockZ()) {
          event.setCancelled(true);
        }
      }
    }
  }
}

Fixed version (ground truth):
@EventHandler(ignoreCancelled=true) public void onSandCannon(EntityChangeBlockEvent event){
  BukkitEntity entity=new BukkitEntity(event.getEntity());
  if (manager.isPlotWorld(entity) && event.getEntityType().equals(EntityType.FALLING_BLOCK)) {
    if (event.getTo().equals(Material.AIR)) {
      entity.setMetadata("String_Node_Str",new FixedMetadataValue(plugin,event.getBlock().getLocation()));
    }
 else {
      List<MetadataValue> values=entity.getMetadata("String_Node_Str");
      if (!values.isEmpty()) {
        org.bukkit.Location spawn=(org.bukkit.Location)(values.get(0).value());
        org.bukkit.Location createdNew=event.getBlock().getLocation();
        if (spawn.getBlockX() != createdNew.getBlockX() || spawn.getBlockZ() != createdNew.getBlockZ()) {
          event.setCancelled(true);
        }
      }
    }
  }
}
Program: 41986
Project: 41986
Buggy source:
public boolean isAllowedConsulting(String name){
  if ("String_Node_Str".equalsIgnoreCase(name)) {
    return isAllowedInternal(name);
  }
  UUID player=PlotMeCoreManager.getInstance().getOfflinePlayer(name).getUniqueId();
  return player != null && isAllowedInternal(name);
}

Fixed version (ground truth):
public boolean isAllowedConsulting(String name){
  if ("String_Node_Str".equals(name)) {
    return isAllowedInternal(name);
  }
  UUID player=PlotMeCoreManager.getInstance().getOfflinePlayer(name).getUniqueId();
  return player != null && isAllowedInternal(name);
}
Program: 41987
Project: 41987
Buggy source:
private boolean isAllowedInternal(String name){
  if (getAllowed().containsKey(name)) {
    AccessLevel accessLevel=getAllowed().get(name);
    if (accessLevel == AccessLevel.ALLOWED) {
      return true;
    }
 else     if (!"String_Node_Str".equalsIgnoreCase(name)) {
      if (accessLevel == AccessLevel.TRUSTED) {
        return PlotMeCoreManager.getInstance().getOfflinePlayer(name).isOnline();
      }
    }
  }
 else {
    return getAllowed().containsKey("String_Node_Str");
  }
  return false;
}

Fixed version (ground truth):
private boolean isAllowedInternal(String name){
  if (getAllowed().containsKey(name)) {
    AccessLevel accessLevel=getAllowed().get(name);
    if (accessLevel == AccessLevel.ALLOWED) {
      return true;
    }
 else     if (!"String_Node_Str".equals(name)) {
      if (accessLevel == AccessLevel.TRUSTED) {
        return PlotMeCoreManager.getInstance().getOfflinePlayer(name).isOnline();
      }
    }
  }
 else {
    return getAllowed().containsKey("String_Node_Str");
  }
  return false;
}
Program: 41999
Project: 41999
Buggy source:
private boolean handleConsoleCommands(CommandSender sender,String[] args){
  if (args.length == 0) {
    PlotCommand command=commandMap.get("String_Node_Str");
    if (command != null) {
      try {
        return command.execute(new BukkitCommandSender(sender),args);
      }
 catch (      Exception e) {
        e.printStackTrace();
      }
    }
  }
 else {
    if ("String_Node_Str".equalsIgnoreCase(args[0])) {
      PlotCommand command=commandMap.get("String_Node_Str");
      if (command != null) {
        try {
          return command.execute(new BukkitCommandSender(sender),args);
        }
 catch (        Exception e) {
          e.printStackTrace();
        }
      }
    }
  }
  return false;
}

Fixed version (ground truth):
private boolean handleConsoleCommands(CommandSender sender,String[] args){
  if (args.length == 0) {
    PlotCommand command=commandMap.get("String_Node_Str");
    if (command != null) {
      return command.execute(new BukkitCommandSender(sender),args);
    }
  }
 else {
    if ("String_Node_Str".equalsIgnoreCase(args[0])) {
      PlotCommand command=commandMap.get("String_Node_Str");
      if (command != null) {
        return command.execute(new BukkitCommandSender(sender),args);
      }
    }
  }
  return false;
}
Program: 42000
Project: 42000
Buggy source:
@Override public boolean onCommand(CommandSender sender,Command command,String label,String[] args){
  if (sender instanceof Player) {
    if (args.length == 0) {
      try {
        return commandMap.get("String_Node_Str").execute(plugin.wrapPlayer((Player)sender),args);
      }
 catch (      Exception e) {
        e.printStackTrace();
      }
    }
    if (args[0] == null) {
      api.getLogger().severe("String_Node_Str");
      return false;
    }
    PlotCommand _command=commandMap.get(args[0]);
    if (_command == null) {
      sender.sendMessage("String_Node_Str");
      return true;
    }
 else {
      try {
        return _command.execute(new BukkitPlayer((Player)sender),args);
      }
 catch (      Exception e) {
        e.printStackTrace();
      }
    }
  }
 else {
    return handleConsoleCommands(sender,args);
  }
  return false;
}

Fixed version (ground truth):
@Override public boolean onCommand(CommandSender sender,Command command,String label,String[] args){
  if (sender instanceof Player) {
    if (args.length == 0) {
      return commandMap.get("String_Node_Str").execute(plugin.wrapPlayer((Player)sender),args);
    }
    if (args[0] == null) {
      api.getLogger().severe("String_Node_Str");
      return false;
    }
    PlotCommand _command=commandMap.get(args[0]);
    if (_command == null) {
      sender.sendMessage("String_Node_Str");
      return true;
    }
 else {
      return _command.execute(new BukkitPlayer((Player)sender),args);
    }
  }
 else {
    return handleConsoleCommands(sender,args);
  }
}
Program: 42001
Project: 42001
Buggy source:
public BukkitServerBridge(Logger logger){
  super(logger);
}

Fixed version (ground truth):
public BukkitServerBridge(PlotMe_CorePlugin plotMeCorePlugin,Logger logger){
  super(logger);
  this.plotMeCorePlugin=plotMeCorePlugin;
}
Program: 42002
Project: 42002
Buggy source:
@Override public int scheduleSyncRepeatingTask(Runnable func,long l,long l2){
  return Bukkit.getScheduler().scheduleSyncRepeatingTask(PlotMe_CorePlugin.getInstance(),func,l,l2);
}

Fixed version (ground truth):
@Override public int scheduleSyncRepeatingTask(Runnable func,long l,long l2){
  return Bukkit.getScheduler().scheduleSyncRepeatingTask(plotMeCorePlugin,func,l,l2);
}
Program: 42003
Project: 42003
Buggy source:
@Override public void runTaskLater(Runnable runnable,long delay){
  Bukkit.getServer().getScheduler().runTaskLater(PlotMe_CorePlugin.getInstance(),runnable,delay);
}

Fixed version (ground truth):
@Override public void runTaskLater(Runnable runnable,long delay){
  Bukkit.getServer().getScheduler().runTaskLater(plotMeCorePlugin,runnable,delay);
}
Program: 42004
Project: 42004
Buggy source:
@Override public File getDataFolder(){
  return PlotMe_CorePlugin.getInstance().getDataFolder();
}

Fixed version (ground truth):
@Override public File getDataFolder(){
  return plotMeCorePlugin.getDataFolder();
}
Program: 42005
Project: 42005
Buggy source:
public File getWorldFolder(){
  return PlotMe_CorePlugin.getInstance().getServer().getWorldContainer();
}

Fixed version (ground truth):
public File getWorldFolder(){
  return plotMeCorePlugin.getServer().getWorldContainer();
}
Program: 42006
Project: 42006
Buggy source:
@Override public void scheduleSyncDelayedTask(Runnable task,int i){
  Bukkit.getScheduler().scheduleSyncDelayedTask(PlotMe_CorePlugin.getInstance(),task,i);
}

Fixed version (ground truth):
@Override public void scheduleSyncDelayedTask(Runnable task,int i){
  Bukkit.getScheduler().scheduleSyncDelayedTask(plotMeCorePlugin,task,i);
}
Program: 42007
Project: 42007
Buggy source:
@Override public void runTaskAsynchronously(Runnable runnable){
  Bukkit.getScheduler().runTaskAsynchronously(PlotMe_CorePlugin.getInstance(),runnable);
}

Fixed version (ground truth):
@Override public void runTaskAsynchronously(Runnable runnable){
  Bukkit.getScheduler().runTaskAsynchronously(plotMeCorePlugin,runnable);
}
Program: 42008
Project: 42008
Buggy source:
/** 
 * Setup PlotMe plugin hooks
 */
@Override public void setupHooks(){
  PluginManager pluginManager=PlotMe_CorePlugin.getInstance().getServer().getPluginManager();
  if (pluginManager.getPlugin("String_Node_Str") != null) {
    WorldEditPlugin worldEdit=(WorldEditPlugin)pluginManager.getPlugin("String_Node_Str");
    worldEdit.getWorldEdit().getEventBus().register(new PlotWorldEditListener());
  }
  setUsingLwc(pluginManager.getPlugin("String_Node_Str") != null);
}

Fixed version (ground truth):
/** 
 * Setup PlotMe plugin hooks
 */
@Override public void setupHooks(){
  PluginManager pluginManager=plotMeCorePlugin.getServer().getPluginManager();
  if (pluginManager.getPlugin("String_Node_Str") != null) {
    WorldEditPlugin worldEdit=(WorldEditPlugin)pluginManager.getPlugin("String_Node_Str");
    worldEdit.getWorldEdit().getEventBus().register(new PlotWorldEditListener());
  }
  setUsingLwc(pluginManager.getPlugin("String_Node_Str") != null);
}
Program: 42009
Project: 42009
Buggy source:
@Override public void onEnable(){
  INSTANCE=this;
  getLogger().info("String_Node_Str");
  serverObjectBuilder=new BukkitServerBridge(getLogger());
  plotme.registerServerBridge(serverObjectBuilder);
  getAPI().enable();
  doMetric();
  PluginManager pm=getServer().getPluginManager();
  pm.registerEvents(new BukkitPlotListener(),this);
  pm.registerEvents(new BukkitPlotDenyListener(),this);
  this.getCommand("String_Node_Str").setExecutor(new BukkitCommand(this));
}

Fixed version (ground truth):
@Override public void onEnable(){
  INSTANCE=this;
  getLogger().info("String_Node_Str");
  serverObjectBuilder=new BukkitServerBridge(this,getLogger());
  plotme.registerServerBridge(serverObjectBuilder);
  getAPI().enable();
  doMetric();
  PluginManager pm=getServer().getPluginManager();
  pm.registerEvents(new BukkitPlotListener(this),this);
  pm.registerEvents(new BukkitPlotDenyListener(this),this);
  this.getCommand("String_Node_Str").setExecutor(new BukkitCommand(this));
}
Program: 42010
Project: 42010
Buggy source:
/** 
 * Uses the code that allows a delay while "Teleporting" or moving the entity
 * @param location new location
 */
@Override public void teleport(Location location){
  final int delay=PlotMe_CorePlugin.getInstance().getAPI().getConfig().getInt("String_Node_Str");
  player.sendMessage(String.format("String_Node_Str",delay));
  PlotMe_CorePlugin.getInstance().getServerObjectBuilder().runTaskLater(new TeleportRunnable(this,location),delay);
}

Fixed version (ground truth):
/** 
 * Uses the code that allows a delay while "Teleporting" or moving the entity
 * @param location new location
 */
@Override public void teleport(Location location){
  final int delay=PlotMe_CorePlugin.getInstance().getAPI().getConfig().getInt("String_Node_Str");
  if (delay != 0) {
    player.sendMessage(String.format("String_Node_Str",delay));
  }
  PlotMe_CorePlugin.getInstance().getServerObjectBuilder().runTaskLater(new TeleportRunnable(this,location),delay);
}
Program: 42011
Project: 42011
Buggy source:
@EventHandler(priority=EventPriority.HIGH) public void onPlayerMove(PlayerMoveEvent event){
  IPlayer player=plugin.wrapPlayer(event.getPlayer());
  if (manager.isPlotWorld(player) && !player.hasPermission(PermissionNames.ADMIN_BYPASSDENY)) {
    Location to=new Location(player.getWorld(),BukkitUtil.locationToVector(event.getTo()));
    Plot plot=manager.getPlot(to);
    if (plot != null && plot.isDenied(player.getUniqueId())) {
      event.setTo(event.getFrom());
    }
  }
}

Fixed version (ground truth):
@EventHandler(priority=EventPriority.HIGH) public void onPlayerMove(PlayerMoveEvent event){
  BukkitPlayer player=(BukkitPlayer)plugin.wrapPlayer(event.getPlayer());
  if (manager.isPlotWorld(player) && !player.hasPermission(PermissionNames.ADMIN_BYPASSDENY)) {
    Location to=new Location(player.getWorld(),BukkitUtil.locationToVector(event.getTo()));
    Plot plot=manager.getPlot(to);
    if (plot != null && plot.isDenied(player.getUniqueId())) {
      event.setTo(event.getFrom());
    }
  }
}
Program: 42012
Project: 42012
Buggy source:
public BukkitPlotDenyListener(){
  plugin=PlotMe_CorePlugin.getInstance();
  manager=PlotMeCoreManager.getInstance();
}

Fixed version (ground truth):
public BukkitPlotDenyListener(PlotMe_CorePlugin plotMeCorePlugin){
  plugin=plotMeCorePlugin;
  manager=PlotMeCoreManager.getInstance();
}
Program: 42013
Project: 42013
Buggy source:
public BukkitPlotListener(){
  api=PlotMe_CorePlugin.getInstance().getAPI();
  this.plugin=PlotMe_CorePlugin.getInstance();
  manager=PlotMeCoreManager.getInstance();
}

Fixed version (ground truth):
public BukkitPlotListener(PlotMe_CorePlugin plotMeCorePlugin){
  api=plotMeCorePlugin.getAPI();
  this.plugin=plotMeCorePlugin;
  manager=PlotMeCoreManager.getInstance();
}
Program: 42014
Project: 42014
Buggy source:
private Plot getPlotById(PlotId id,Location location){
  return getPlotById(id,location.getWorld());
}

Fixed version (ground truth):
/** 
 * Gets the plot with the given id in the given world.
 * @param id plot id
 * @param world
 * @return plot
 */
public Plot getPlotById(PlotId id,IWorld world){
  return plugin.getSqlManager().getPlot(id,world);
}
Program: 42015
Project: 42015
Buggy source:
public boolean isPlotAvailable(Location location){
  PlotId id=getPlotId(location);
  return id != null && getPlotById(id,location) == null;
}

Fixed version (ground truth):
/** 
 * Checks if the plot is claimed or not
 * @param id    the plot id to be checked
 * @param world
 * @return true if the plot is unclaimed, false otherwise
 */
public boolean isPlotAvailable(PlotId id,IWorld world){
  for (  Plot plot : plugin.getSqlManager().worldToPlotMap.get(world)) {
    if (plot.getId().equals(id)) {
      return false;
    }
  }
  if (getPlotTopLoc(world,id).getX() > world.getWorldBorder().minX()) {
    if (getPlotBottomLoc(world,id).getX() < world.getWorldBorder().maxX()) {
      if (getPlotTopLoc(world,id).getZ() > world.getWorldBorder().minZ()) {
        if (getPlotBottomLoc(world,id).getZ() < world.getWorldBorder().maxZ()) {
          return true;
        }
      }
    }
  }
  return false;
}
Program: 42016
Project: 42016
Buggy source:
@Override public void run(){
  Database sqlmanager=plugin.getSqlManager();
  PlotMeCoreManager plotMeCoreManager=PlotMeCoreManager.getInstance();
  if (plugin.getWorldCurrentlyProcessingExpired() != null) {
    IWorld world=plugin.getWorldCurrentlyProcessingExpired();
    TreeSet<Plot> expiredPlots=sqlmanager.getExpiredPlots(world);
    if (expiredPlots.isEmpty()) {
      plugin.setCounterExpired(0);
    }
 else {
      String ids="String_Node_Str";
      for (      Plot expiredPlot : expiredPlots) {
        PlotResetEvent event=new PlotResetEvent(world,expiredPlot,sender);
        plugin.getEventBus().post(event);
        if (!event.isCancelled()) {
          plotMeCoreManager.clear(expiredPlot,world,sender,ClearReason.Expired);
          PlotId id=expiredPlot.getId();
          ids+=id + "String_Node_Str";
          plotMeCoreManager.deletePlot(world,expiredPlot);
          plugin.setCounterExpired(plugin.getCounterExpired() - 1);
        }
      }
      if ("String_Node_Str".equals(ids.substring(ids.length() - 2))) {
        ids=ids.substring(0,ids.length() - 2);
      }
      plugin.getLogger().info(plugin.C("String_Node_Str") + "String_Node_Str" + ids);
    }
    if (plugin.getCounterExpired() == 0) {
      plugin.getLogger().info(plugin.C("String_Node_Str"));
      plugin.setWorldCurrentlyProcessingExpired(null);
    }
  }
}

Fixed version (ground truth):
@Override public void run(){
  Database sqlmanager=plugin.getSqlManager();
  PlotMeCoreManager plotMeCoreManager=PlotMeCoreManager.getInstance();
  if (plugin.getWorldCurrentlyProcessingExpired() != null) {
    IWorld world=plugin.getWorldCurrentlyProcessingExpired();
    if (plotMeCoreManager.getMap(world).getDaysToExpiration() == 0) {
      return;
    }
    List<Plot> expiredPlots=sqlmanager.getExpiredPlots(world);
    if (expiredPlots.isEmpty()) {
      plugin.setCounterExpired(0);
    }
 else {
      String ids="String_Node_Str";
      for (      Plot expiredPlot : expiredPlots) {
        PlotResetEvent event=new PlotResetEvent(world,expiredPlot,sender);
        plugin.getEventBus().post(event);
        if (!event.isCancelled()) {
          plotMeCoreManager.clear(expiredPlot,world,sender,ClearReason.Expired);
          PlotId id=expiredPlot.getId();
          ids+=id + "String_Node_Str";
          plotMeCoreManager.deletePlot(world,expiredPlot);
          plugin.setCounterExpired(plugin.getCounterExpired() - 1);
        }
      }
      if ("String_Node_Str".equals(ids.substring(ids.length() - 2))) {
        ids=ids.substring(0,ids.length() - 2);
      }
      plugin.getLogger().info(plugin.C("String_Node_Str") + "String_Node_Str" + ids);
    }
    if (plugin.getCounterExpired() == 0) {
      plugin.getLogger().info(plugin.C("String_Node_Str"));
      plugin.setWorldCurrentlyProcessingExpired(null);
    }
  }
}
Program: 42017
Project: 42017
Buggy source:
public void removeDenied(String name){
  if (getDenied().contains(name)) {
    PlotMeCoreManager.getInstance().getSQLManager().deletePlotDenied(getInternalID(),name);
  }
}

Fixed version (ground truth):
public void removeDenied(String name){
  if (getDenied().contains(name)) {
    getDenied().remove(name);
    PlotMeCoreManager.getInstance().getSQLManager().deletePlotDenied(getInternalID(),name);
  }
}
Program: 42018
Project: 42018
Buggy source:
public int getTopX(){
  return topX;
}

Fixed version (ground truth):
public int getTopX(){
  return plotTopLoc.getBlockX();
}
Program: 42019
Project: 42019
Buggy source:
public int getTopZ(){
  return topZ;
}

Fixed version (ground truth):
public int getTopZ(){
  return plotTopLoc.getBlockZ();
}
Program: 42020
Project: 42020
Buggy source:
public int getBottomX(){
  return bottomX;
}

Fixed version (ground truth):
public int getBottomX(){
  return plotBottomLoc.getBlockX();
}
Program: 42021
Project: 42021
Buggy source:
public Plot(long internalID,String owner,UUID ownerId,IWorld world,String biome,Date expiredDate,HashMap<String,AccessLevel> allowed,HashSet<String> denied,HashSet<String> likers,PlotId id,double price,boolean forSale,boolean finished,String finishedDate,boolean protect,Map<String,Map<String,String>> metadata,int plotLikes,String plotName,int topX,int bottomX,int topZ,int bottomZ,String createdDate){
  setInternalID(internalID);
  setOwner(owner);
  setOwnerId(ownerId);
  setWorld(world);
  setBiome(biome);
  setExpiredDate(expiredDate);
  setFinished(finished);
  this.allowed.putAll(allowed);
  setId(id);
  setPrice(price);
  setForSale(forSale);
  setFinishedDate(finishedDate);
  setProtected(protect);
  setLikers(likers);
  setLikes(plotLikes);
  setPlotName(plotName);
  this.denied.addAll(denied);
  this.metadata.putAll(metadata);
  this.topX=topX;
  this.bottomX=bottomX;
  this.topZ=topZ;
  this.bottomZ=bottomZ;
  this.createdDate=createdDate;
}

Fixed version (ground truth):
public Plot(long internalID,String owner,UUID ownerId,IWorld world,String biome,Date expiredDate,HashMap<String,AccessLevel> allowed,HashSet<String> denied,HashSet<String> likers,PlotId id,double price,boolean forSale,boolean finished,String finishedDate,boolean protect,Map<String,Map<String,String>> metadata,int plotLikes,String plotName,Vector topLoc,Vector bottomLoc,String createdDate){
  setInternalID(internalID);
  setOwner(owner);
  setOwnerId(ownerId);
  setWorld(world);
  setBiome(biome);
  setExpiredDate(expiredDate);
  setFinished(finished);
  this.allowed.putAll(allowed);
  setId(id);
  setPrice(price);
  setForSale(forSale);
  setFinishedDate(finishedDate);
  setProtected(protect);
  setLikers(likers);
  setLikes(plotLikes);
  setPlotName(plotName);
  this.denied.addAll(denied);
  this.metadata.putAll(metadata);
  this.plotTopLoc=topLoc;
  this.plotBottomLoc=bottomLoc;
  this.createdDate=createdDate;
}
Program: 42022
Project: 42022
Buggy source:
public int getBottomZ(){
  return bottomZ;
}

Fixed version (ground truth):
public int getBottomZ(){
  return plotBottomLoc.getBlockZ();
}
Program: 42023
Project: 42023
Buggy source:
public void removeAllowed(String name){
  if (getMembers().containsKey(name)) {
    PlotMeCoreManager.getInstance().getSQLManager().deletePlotAllowed(getInternalID(),name);
  }
}

Fixed version (ground truth):
public void removeAllowed(String name){
  if (getMembers().containsKey(name)) {
    getMembers().remove(name,AccessLevel.ALLOWED);
    PlotMeCoreManager.getInstance().getSQLManager().deletePlotMember(getInternalID(),name);
  }
}
Program: 42024
Project: 42024
Buggy source:
public Plot getPlot(PlotId id){
  if (id == null) {
    return null;
  }
  if (!plots.containsKey(id)) {
    Plot plot=plugin.getSqlManager().getPlot(world,id);
    if (plot == null) {
      return null;
    }
    plots.put(id,plot);
  }
  return plots.get(id);
}

Fixed version (ground truth):
public Plot getPlot(PlotId id){
  if (id == null) {
    return null;
  }
  if (!plots.containsKey(id)) {
    Plot plot=plugin.getSqlManager().getPlot(id,world);
    if (plot == null) {
      return null;
    }
    plots.put(id,plot);
  }
  return plots.get(id);
}
Program: 42025
Project: 42025
Buggy source:
/** 
 * Get the number of plots the player owns
 * @param uuid player UUID
 * @param world plotworld
 * @return number of plots the player owns
 */
public int getOwnedPlotCount(UUID uuid,String world){
  return plugin.getSqlManager().getPlotCount(world,uuid);
}

Fixed version (ground truth):
/** 
 * Get the number of plots the player owns
 * @param uuid player UUID
 * @param world plotworld
 * @return number of plots the player owns
 */
public int getOwnedPlotCount(UUID uuid,IWorld world){
  return plugin.getSqlManager().getPlotCount(world,uuid);
}
Program: 42032
Project: 42032
Buggy source:
public boolean execute(ICommandSender sender,String[] args) throws Exception {
}

Fixed version (ground truth):
public boolean execute(ICommandSender sender,String[] args) throws Exception {
  if (args.length > 1) {
    throw new BadUsageException(getUsage());
  }
  IPlayer player=(IPlayer)sender;
  if (player.hasPermission(PermissionNames.USER_MIDDLE) || player.hasPermission(PermissionNames.ADMIN_MIDDLE_OTHER)) {
    if (manager.isPlotWorld(player)) {
      IWorld world=player.getWorld();
      PlotId id=manager.getPlotId(player);
      if (id == null) {
        player.sendMessage(C("String_Node_Str"));
        return true;
      }
      Plot plot=manager.getPlotById(id,world);
      if (plot == null) {
        player.sendMessage(C("String_Node_Str"));
      }
 else       if (plot.isAllowed(player.getUniqueId()) || player.hasPermission(PermissionNames.ADMIN_MIDDLE_OTHER)) {
        Vector middleloc=manager.getPlotMiddle(world,plot.getId());
        ILocation location=new ILocation(world,middleloc);
        PlotTeleportMiddleEvent event=new PlotTeleportMiddleEvent(plot,player,location);
        plugin.getEventBus().post(event);
        if (!event.isCancelled()) {
          player.setLocation(event.getMiddleLocation());
        }
      }
 else {
        player.sendMessage(C("String_Node_Str"));
      }
    }
 else {
      player.sendMessage(C("String_Node_Str"));
    }
  }
 else {
    return false;
  }
  return true;
}
Program: 42033
Project: 42033
Buggy source:
@Override public void onEnable(){
  INSTANCE=this;
  getLogger().info("String_Node_Str");
  serverObjectBuilder=new BukkitServerBridge(getLogger());
  plotme=new PlotMe_Core();
  plotme.registerServerBridge(serverObjectBuilder);
  getAPI().enable();
  doMetric();
  PluginManager pm=getServer().getPluginManager();
  pm.registerEvents(new BukkitPlotListener(),this);
  pm.registerEvents(new BukkitPlotDenyListener(),this);
  this.getCommand("String_Node_Str").setExecutor(new BukkitCommand(this));
}

Fixed version (ground truth):
@Override public void onEnable(){
  INSTANCE=this;
  getLogger().info("String_Node_Str");
  serverObjectBuilder=new BukkitServerBridge(getLogger());
  plotme.registerServerBridge(serverObjectBuilder);
  getAPI().enable();
  doMetric();
  PluginManager pm=getServer().getPluginManager();
  pm.registerEvents(new BukkitPlotListener(),this);
  pm.registerEvents(new BukkitPlotDenyListener(),this);
  this.getCommand("String_Node_Str").setExecutor(new BukkitCommand(this));
}
Program: 42034
Project: 42034
Buggy source:
private void setupWorld(IWorld world){
  getServerBridge().loadDefaultConfig(configFile,"String_Node_Str" + world.getName().toLowerCase());
  PlotMapInfo pmi=new PlotMapInfo(configFile,world.getName().toLowerCase());
  PlotMeCoreManager.getInstance().addPlotMap(world,pmi);
  getSqlManager().loadPlotsAsynchronously(world);
}

Fixed version (ground truth):
private void setupWorld(IWorld world){
  getLogger().info("String_Node_Str");
  getServerBridge().loadDefaultConfig(configFile,"String_Node_Str" + world.getName().toLowerCase());
  PlotMapInfo pmi=new PlotMapInfo(configFile,world.getName().toLowerCase());
  PlotMeCoreManager.getInstance().addPlotMap(world,pmi);
  getSqlManager().loadPlotsAsynchronously(world);
}
Program: 42035
Project: 42035
Buggy source:
private boolean handleConsoleCommands(CommandSender sender,String[] args){
  if (args.length == 0) {
    PlotCommand command=commandMap.get("String_Node_Str");
    if (command != null) {
      try {
        return command.execute(new BukkitCommandSender(sender),args);
      }
 catch (      Exception e) {
        e.printStackTrace();
      }
    }
  }
 else {
    sender.sendMessage("String_Node_Str");
  }
  if ("String_Node_Str".equalsIgnoreCase(args[0])) {
    PlotCommand command=commandMap.get("String_Node_Str");
    if (command != null) {
      try {
        return command.execute(new BukkitCommandSender(sender),args);
      }
 catch (      Exception e) {
        e.printStackTrace();
      }
    }
  }
  return false;
}

Fixed version (ground truth):
private boolean handleConsoleCommands(CommandSender sender,String[] args){
  if (args.length == 0) {
    PlotCommand command=commandMap.get("String_Node_Str");
    if (command != null) {
      try {
        return command.execute(new BukkitCommandSender(sender),args);
      }
 catch (      Exception e) {
        e.printStackTrace();
      }
    }
  }
 else {
    if ("String_Node_Str".equalsIgnoreCase(args[0])) {
      PlotCommand command=commandMap.get("String_Node_Str");
      if (command != null) {
        try {
          return command.execute(new BukkitCommandSender(sender),args);
        }
 catch (        Exception e) {
          e.printStackTrace();
        }
      }
    }
  }
  return false;
}
Program: 42038
Project: 42038
Buggy source:
@Override public void run(){
  plugin.getLogger().info("String_Node_Str" + world);
  ArrayList<Plot> plots=getPlots(world);
  worldToPlotMap.put(world,plots);
  PlotWorldLoadEvent eventWorld=new PlotWorldLoadEvent(world,plots.size());
  plugin.getEventBus().post(eventWorld);
  for (  Plot plot : plots) {
    PlotLoadEvent event=new PlotLoadEvent(world,plot);
    plugin.getEventBus().post(event);
  }
}

Fixed version (ground truth):
@Override public void run(){
  plugin.getLogger().info("String_Node_Str" + world.getName());
  ArrayList<Plot> plots=getPlots(world);
  worldToPlotMap.put(world,plots);
  PlotWorldLoadEvent eventWorld=new PlotWorldLoadEvent(world,plots.size());
  plugin.getEventBus().post(eventWorld);
  for (  Plot plot : plots) {
    PlotLoadEvent event=new PlotLoadEvent(world,plot);
    plugin.getEventBus().post(event);
  }
}