nus-yam/ex-repair huggingface dataset:
Program: 42040
Project: 42040
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();
      }
    }
    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) {
      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;
}
Program: 42041
Project: 42041
Buggy source:
public boolean execute(ICommandSender sender,String[] args) throws Exception {
  IPlayer player=(IPlayer)sender;
  if (player.hasPermission(PermissionNames.ADMIN_ADDTIME)) {
    if (manager.isPlotWorld(player)) {
      PlotMapInfo pmi=manager.getMap(player);
      if (pmi.getDaysToExpiration() != 0) {
        PlotId id=manager.getPlotId(player);
        if (id == null) {
          player.sendMessage(C("String_Node_Str"));
          return true;
        }
        if (!manager.isPlotAvailable(id,pmi)) {
          Plot plot=manager.getPlotById(id,pmi);
          if (plot != null) {
            String name=player.getName();
            plot.resetExpire(pmi.getDaysToExpiration());
            player.sendMessage(C("String_Node_Str"));
            if (isAdvancedLogging()) {
              serverBridge.getLogger().info(name + "String_Node_Str" + id);
            }
          }
        }
 else {
          player.sendMessage(C("String_Node_Str") + "String_Node_Str" + id+ "String_Node_Str"+ C("String_Node_Str"));
          return true;
        }
      }
 else {
        return true;
      }
    }
 else {
      player.sendMessage(C("String_Node_Str"));
      return true;
    }
  }
 else {
    return false;
  }
  return true;
}

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.ADMIN_ADDTIME)) {
    if (manager.isPlotWorld(player)) {
      PlotMapInfo pmi=manager.getMap(player);
      if (pmi.getDaysToExpiration() != 0) {
        PlotId id=manager.getPlotId(player);
        if (id == null) {
          player.sendMessage(C("String_Node_Str"));
          return true;
        }
        if (!manager.isPlotAvailable(id,pmi)) {
          Plot plot=manager.getPlotById(id,pmi);
          if (plot != null) {
            String name=player.getName();
            plot.resetExpire(pmi.getDaysToExpiration());
            player.sendMessage(C("String_Node_Str"));
            if (isAdvancedLogging()) {
              serverBridge.getLogger().info(name + "String_Node_Str" + id);
            }
          }
        }
 else {
          player.sendMessage(C("String_Node_Str") + "String_Node_Str" + id+ "String_Node_Str"+ C("String_Node_Str"));
          return true;
        }
      }
 else {
        return true;
      }
    }
 else {
      player.sendMessage(C("String_Node_Str"));
      return true;
    }
  }
 else {
    return false;
  }
  return true;
}
Program: 42042
Project: 42042
Buggy source:
@EventHandler(priority=EventPriority.HIGH,ignoreCancelled=true) public void onBlockPistonExtend(BlockPistonExtendEvent event){
  BukkitLocation location=new BukkitLocation(event.getBlock().getLocation());
  if (manager.isPlotWorld(location)) {
    BlockFace face=event.getDirection();
    for (    Block block : event.getBlocks()) {
      PlotId id=manager.getPlotId(new BukkitLocation(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){
  BukkitLocation location=new BukkitLocation(event.getBlock().getLocation());
  if (manager.isPlotWorld(location)) {
    BlockFace face=event.getDirection();
    for (    Block block : event.getBlocks()) {
      PlotId id=manager.getPlotId(new BukkitLocation(block.getLocation().add(face.getModX(),face.getModY(),face.getModZ())));
      if (id == null) {
        event.setCancelled(true);
      }
    }
  }
}
Program: 42044
Project: 42044
Buggy source:
/** 
 * Create the file if it does not exist.
 * @return true if the file was created, false if it exists or was never created
 */
public boolean createFile(){
  if (!configFile.exists()) {
    saveFile(false);
    return true;
  }
  return false;
}

Fixed version (ground truth):
/** 
 * Create the file if it does not exist.
 * @return true if the file was created, false if it exists or was never created
 */
public boolean createFile(){
  if (!configFile.exists()) {
    saveFile(true);
    return true;
  }
  return false;
}
Program: 42045
Project: 42045
Buggy source:
private void createConfigs(){
  configFile.createFile();
  captionFile.createFile();
}

Fixed version (ground truth):
private void createConfigs(){
  if (configFile.createFile()) {
    getLogger().info("String_Node_Str");
  }
  if (captionFile.createFile()) {
    getLogger().info("String_Node_Str");
  }
}
Program: 42046
Project: 42046
Buggy source:
@SuppressWarnings("String_Node_Str") public abstract boolean addMultiverseWorld(String worldName,String seed,String generator);

Fixed version (ground truth):
public abstract boolean addMultiverseWorld(String worldName,String seed,String generator);
Program: 42047
Project: 42047
Buggy source:
@SuppressWarnings("String_Node_Str") public abstract Collection<IWorld> getWorlds();

Fixed version (ground truth):
/** 
 * Get all Existing Plotworlds.
 * @return all plotworlds on the server
 */
public abstract Collection<IWorld> getWorlds();
Program: 42048
Project: 42048
Buggy source:
@SuppressWarnings("String_Node_Str") public abstract IOfflinePlayer getOfflinePlayer(String player);

Fixed version (ground truth):
public abstract IOfflinePlayer getOfflinePlayer(String player);
Program: 42049
Project: 42049
Buggy source:
@SuppressWarnings("String_Node_Str") public abstract IMaterial getMaterial(String string);

Fixed version (ground truth):
public abstract IMaterial getMaterial(String string);
Program: 42050
Project: 42050
Buggy source:
@EventHandler(priority=EventPriority.HIGH,ignoreCancelled=true) public void onBlockPistonExtend(BlockPistonExtendEvent event){
  BukkitLocation location=new BukkitLocation(event.getBlock().getLocation());
  if (manager.isPlotWorld(location)) {
    BlockFace face=event.getDirection();
    for (    Block block : event.getBlocks()) {
      PlotId id=manager.getPlotId(new BukkitLocation(block.getLocation().add(face.getModX(),face.getModY(),face.getModZ())));
      if (id == null) {
        event.setCancelled(true);
      }
 else {
        PlotToClear ptc=api.getPlotLocked(location.getWorld(),id);
        if (ptc != null) {
          event.setCancelled(true);
        }
      }
    }
  }
}

Fixed version (ground truth):
@EventHandler(priority=EventPriority.HIGH,ignoreCancelled=true) public void onBlockPistonExtend(BlockPistonExtendEvent event){
  BukkitLocation location=new BukkitLocation(event.getBlock().getLocation());
  if (manager.isPlotWorld(location)) {
    BlockFace face=event.getDirection();
    for (    Block block : event.getBlocks()) {
      PlotId id=manager.getPlotId(new BukkitLocation(block.getLocation().add(face.getModX(),face.getModY(),face.getModZ())));
      if (id == null) {
        event.setCancelled(true);
      }
    }
  }
}
Program: 42051
Project: 42051
Buggy source:
@EventHandler(priority=EventPriority.HIGH,ignoreCancelled=true) public void onBlockPistonRetract(BlockPistonRetractEvent event){
  BukkitBlock block=new BukkitBlock(event.getBlock().getRelative(event.getDirection(),2));
  if (manager.isPlotWorld(block.getWorld()) && event.isSticky()) {
    PlotId id=manager.getPlotId(block.getLocation());
    if (id == null) {
      BukkitBlock block2=new BukkitBlock(event.getBlock().getRelative(event.getDirection(),3));
      PlotId id2=manager.getPlotId(block2.getLocation());
      if (id2 == null) {
        event.setCancelled(true);
      }
      event.setCancelled(true);
    }
 else {
      PlotToClear ptc=api.getPlotLocked(block.getWorld(),id);
      if (ptc != null) {
        event.setCancelled(true);
      }
    }
  }
}

Fixed version (ground truth):
@EventHandler(priority=EventPriority.NORMAL,ignoreCancelled=true) public void onBlockPistonRetract(BlockPistonRetractEvent event){
  BukkitLocation location=new BukkitLocation(event.getBlock().getLocation());
  if (manager.isPlotWorld(location)) {
    List<Block> blocks=event.getBlocks();
    for (    Block moved : blocks) {
      PlotId id=manager.getPlotId(new BukkitLocation(moved.getLocation()));
      if (id == null) {
        event.setCancelled(true);
      }
    }
  }
}
Program: 42052
Project: 42052
Buggy source:
@EventHandler(priority=EventPriority.HIGH,ignoreCancelled=true) public void onBucketEmptyEvent(PlayerBucketEmptyEvent event){
  handleBucketEvent(event);
}

Fixed version (ground truth):
@EventHandler(priority=EventPriority.HIGH,ignoreCancelled=true) public void onBucketEmptyEvent(PlayerBucketEmptyEvent event){
  Player player=event.getPlayer();
  BukkitLocation location=new BukkitLocation(event.getBlockClicked().getLocation());
  if (!player.hasPermission(PermissionNames.ADMIN_BUILDANYWHERE) && manager.isPlotWorld(location)) {
    PlotId id=manager.getPlotId(location.add(event.getBlockFace().getModX(),event.getBlockFace().getModY(),event.getBlockFace().getModZ()));
    if (id == null) {
      player.sendMessage(api.getUtil().C("String_Node_Str"));
      event.setCancelled(true);
    }
 else {
      PlotToClear ptc=api.getPlotLocked(location.getWorld(),id);
      if (ptc != null) {
switch (ptc.getReason()) {
case Clear:
          player.sendMessage(api.getUtil().C("String_Node_Str"));
        break;
case Reset:
      player.sendMessage(api.getUtil().C("String_Node_Str"));
    break;
case Expired:
  player.sendMessage(api.getUtil().C("String_Node_Str"));
break;
}
event.setCancelled(true);
}
 else {
Plot plot=manager.getPlotById(id,location.getWorld());
if (plot == null || !plot.isAllowed(player.getName(),player.getUniqueId())) {
player.sendMessage(api.getUtil().C("String_Node_Str"));
event.setCancelled(true);
}
}
}
}
}
Program: 42053
Project: 42053
Buggy source:
@EventHandler(priority=EventPriority.HIGH,ignoreCancelled=true) public void onBlockBreak(BlockBreakEvent event){
  BukkitLocation location=new BukkitLocation(event.getBlock().getLocation());
  if (manager.isPlotWorld(location)) {
    Player player=event.getPlayer();
    boolean cannotBuild=!player.hasPermission(PermissionNames.ADMIN_BUILDANYWHERE);
    PlotId id=manager.getPlotId(location);
    if (id == null) {
      if (cannotBuild) {
        player.sendMessage(api.getUtil().C("String_Node_Str"));
        event.setCancelled(true);
      }
    }
 else {
      PlotToClear ptc=api.getPlotLocked(location.getWorld().getName(),id);
      if (ptc != null) {
switch (ptc.getReason()) {
case Clear:
          player.sendMessage(api.getUtil().C("String_Node_Str"));
        break;
case Reset:
      player.sendMessage(api.getUtil().C("String_Node_Str"));
    break;
case Expired:
  player.sendMessage(api.getUtil().C("String_Node_Str"));
break;
}
event.setCancelled(true);
}
 else {
Plot plot=manager.getMap(location).getPlot(id);
if (plot == null || !plot.isAllowed(player.getName(),player.getUniqueId())) {
if (cannotBuild) {
player.sendMessage(api.getUtil().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){
  BukkitLocation location=new BukkitLocation(event.getBlock().getLocation());
  if (manager.isPlotWorld(location)) {
    Player player=event.getPlayer();
    boolean cannotBuild=!player.hasPermission(PermissionNames.ADMIN_BUILDANYWHERE);
    PlotId id=manager.getPlotId(location);
    if (id == null) {
      if (cannotBuild) {
        player.sendMessage("String_Node_Str");
        player.sendMessage(api.getUtil().C("String_Node_Str"));
        event.setCancelled(true);
      }
    }
 else {
      PlotToClear ptc=api.getPlotLocked(location.getWorld().getName(),id);
      if (ptc != null) {
switch (ptc.getReason()) {
case Clear:
          player.sendMessage(api.getUtil().C("String_Node_Str"));
        break;
case Reset:
      player.sendMessage(api.getUtil().C("String_Node_Str"));
    break;
case Expired:
  player.sendMessage(api.getUtil().C("String_Node_Str"));
break;
}
event.setCancelled(true);
}
 else {
Plot plot=manager.getMap(location).getPlot(id);
if (plot == null || !plot.isAllowed(player.getName(),player.getUniqueId())) {
if (cannotBuild) {
player.sendMessage("String_Node_Str");
player.sendMessage(api.getUtil().C("String_Node_Str"));
event.setCancelled(true);
}
}
 else {
plot.resetExpire(manager.getMap(location).getDaysToExpiration());
}
}
}
}
}
Program: 42054
Project: 42054
Buggy source:
@Subscribe public void onPlayerMove(PlayerMoveEvent event){
  SpongePlayer player=plugin.wrapPlayer(event.getPlayer());
  if (manager.isPlotWorld(player) && !player.hasPermission(PermissionNames.ADMIN_BYPASSDENY)) {
    SpongeLocation to=new SpongeLocation(event.getNewLocation());
    String idTo=manager.getPlotId(to);
    if (!idTo.isEmpty()) {
      Plot plot=manager.getPlotById(idTo,player);
      if (plot != null && plot.isDeniedInternal(player.getName(),player.getUniqueId())) {
        event.getPlayer().setLocation(event.getOldLocation());
      }
    }
  }
}

Fixed version (ground truth):
@Subscribe public void onPlayerMove(PlayerMoveEvent event){
  SpongePlayer player=plugin.wrapPlayer(event.getPlayer());
  if (manager.isPlotWorld(player) && !player.hasPermission(PermissionNames.ADMIN_BYPASSDENY)) {
    SpongeLocation to=new SpongeLocation(event.getNewLocation());
    PlotId idTo=manager.getPlotId(to);
    if (idTo != null) {
      Plot plot=manager.getPlotById(idTo,player);
      if (plot != null && plot.isDeniedInternal(player.getName(),player.getUniqueId())) {
        event.getPlayer().setLocation(event.getOldLocation());
      }
    }
  }
}
Program: 42055
Project: 42055
Buggy source:
@Subscribe public void onBlockChange(PlayerChangeBlockEvent event){
  SpongeLocation location=new SpongeLocation(event.getBlock().getLocation());
  if (manager.isPlotWorld(location)) {
    String id=manager.getPlotId(location);
    Player player=event.getPlayer();
    boolean cannotBuild=!player.hasPermission(PermissionNames.ADMIN_BUILDANYWHERE);
    if (id.isEmpty()) {
      event.setCancelled(true);
    }
 else {
      PlotToClear ptc=api.getPlotLocked(location.getWorld().getName(),id);
      if (ptc != null) {
switch (ptc.getReason()) {
case Clear:
          player.sendMessage(api.getUtil().C("String_Node_Str"));
        break;
case Reset:
      player.sendMessage(api.getUtil().C("String_Node_Str"));
    break;
case Expired:
  player.sendMessage(api.getUtil().C("String_Node_Str"));
break;
}
event.setCancelled(true);
}
 else {
Plot plot=manager.getMap(location).getPlot(id);
if (plot == null || !plot.isAllowed(player.getName(),player.getUniqueId())) {
if (cannotBuild) {
player.sendMessage(api.getUtil().C("String_Node_Str"));
event.setCancelled(true);
}
}
 else {
plot.resetExpire(manager.getMap(location).getDaysToExpiration());
}
}
}
}
}

Fixed version (ground truth):
@Subscribe public void onBlockChange(PlayerChangeBlockEvent event){
  SpongeLocation location=new SpongeLocation(event.getBlock().getLocation());
  if (manager.isPlotWorld(location)) {
    PlotId id=manager.getPlotId(location);
    Player player=event.getPlayer();
    boolean cannotBuild=!player.hasPermission(PermissionNames.ADMIN_BUILDANYWHERE);
    if (id == null) {
      event.setCancelled(true);
    }
 else {
      PlotToClear ptc=api.getPlotLocked(location.getWorld().getName(),id);
      if (ptc != null) {
switch (ptc.getReason()) {
case Clear:
          player.sendMessage(api.getUtil().C("String_Node_Str"));
        break;
case Reset:
      player.sendMessage(api.getUtil().C("String_Node_Str"));
    break;
case Expired:
  player.sendMessage(api.getUtil().C("String_Node_Str"));
break;
}
event.setCancelled(true);
}
 else {
Plot plot=manager.getMap(location).getPlot(id);
if (plot == null || !plot.isAllowed(player.getName(),player.getUniqueId())) {
if (cannotBuild) {
player.sendMessage(api.getUtil().C("String_Node_Str"));
event.setCancelled(true);
}
}
 else {
plot.resetExpire(manager.getMap(location).getDaysToExpiration());
}
}
}
}
}
Program: 42056
Project: 42056
Buggy source:
@EventHandler(priority=EventPriority.LOW,ignoreCancelled=true) public void onPlayerInteract(PlayerInteractEvent event){
  BukkitPlayer player=(BukkitPlayer)plugin.wrapPlayer(event.getPlayer());
  if (manager.isPlotWorld(player)) {
    if (!player.hasPermission(PermissionNames.ADMIN_BUILDANYWHERE) && !manager.isPlayerIgnoringWELimit(player) && (event.getAction() == Action.LEFT_CLICK_BLOCK || event.getAction() == Action.RIGHT_CLICK_BLOCK)&& event.getItem() != null && event.getItem().getType() != Material.AIR) {
      PlotId id=manager.getPlotId(player);
      Plot plot=manager.getMap(player).getPlot(id);
      if (plot != null && plot.isAllowed(player.getName(),player.getUniqueId())) {
        worldEdit.setMask(player);
      }
 else {
        player.sendMessage(api.getUtil().C("String_Node_Str"));
        event.setCancelled(true);
      }
    }
  }
}

Fixed version (ground truth):
@EventHandler(priority=EventPriority.LOW,ignoreCancelled=true) public void onPlayerInteract(PlayerInteractEvent event){
  BukkitPlayer player=(BukkitPlayer)plugin.wrapPlayer(event.getPlayer());
  BukkitLocation location=new BukkitLocation(event.getClickedBlock().getLocation());
  if (manager.isPlotWorld(player)) {
    if (!player.hasPermission(PermissionNames.ADMIN_BUILDANYWHERE) && !manager.isPlayerIgnoringWELimit(player) && (event.getAction() == Action.LEFT_CLICK_BLOCK || event.getAction() == Action.RIGHT_CLICK_BLOCK)&& event.getItem() != null && event.getItem().getType() != Material.AIR) {
      PlotId id=manager.getPlotId(location);
      Plot plot=manager.getMap(location).getPlot(id);
      if (plot != null && plot.isAllowed(player.getName(),player.getUniqueId())) {
        worldEdit.setMask(player);
      }
 else {
        player.sendMessage(api.getUtil().C("String_Node_Str"));
        event.setCancelled(true);
      }
    }
  }
}
Program: 42057
Project: 42057
Buggy source:
public void setSellSign(IWorld world,Plot plot){
  String line1=Util().C("String_Node_Str");
  String line2=Util().C("String_Node_Str");
  String line3=String.valueOf(plot.getCustomPrice());
  String line4="String_Node_Str" + Util().C("String_Node_Str");
  getGenManager(world).setSellerDisplay(world,plot.getId(),line1,line2,line3,line4);
}

Fixed version (ground truth):
public void setSellSign(IWorld world,Plot plot){
  String line1=Util().C("String_Node_Str");
  String line2=Util().C("String_Node_Str");
  String line3=String.valueOf(plot.getCustomPrice());
  String line4="String_Node_Str";
  getGenManager(world).setSellerDisplay(world,plot.getId(),line1,line2,line3,line4);
}
Program: 42058
Project: 42058
Buggy source:
public boolean exec(ICommandSender sender){
  if (sender.hasPermission("String_Node_Str")) {
    serverBridge.getEventFactory().callPlotReloadEvent();
    plugin.reload();
    serverBridge.getLogger().info(C("String_Node_Str"));
    return true;
  }
 else {
    return false;
  }
}

Fixed version (ground truth):
public boolean exec(ICommandSender sender){
  if (sender.hasPermission("String_Node_Str")) {
    serverBridge.getEventFactory().callPlotReloadEvent();
    plugin.reload();
    sender.sendMessage(C("String_Node_Str"));
    return true;
  }
 else {
    return false;
  }
}
Program: 42065
Project: 42065
Buggy source:
@EventHandler(priority=EventPriority.HIGH,ignoreCancelled=true) public void onBlockIgnite(BlockIgniteEvent event){
  if (event.getIgnitingEntity() == null) {
    return;
  }
  BukkitEntity entity=new BukkitEntity(event.getIgnitingEntity());
  PlotMapInfo pmi=manager.getMap(entity);
  if (pmi == null) {
    return;
  }
  if (pmi.isDisableIgnition()) {
    event.setCancelled(true);
  }
 else {
    String id=manager.getPlotId(entity.getLocation());
    if (id.isEmpty()) {
      event.setCancelled(true);
    }
 else {
      PlotToClear ptc=api.getPlotLocked(entity.getWorld().getName(),id);
      Player player=null;
      if (ptc != null) {
        if (event.getPlayer() != null) {
          player=event.getPlayer();
switch (ptc.getReason()) {
case Clear:
            player.sendMessage(api.getUtil().C("String_Node_Str"));
          break;
case Reset:
        player.sendMessage(api.getUtil().C("String_Node_Str"));
      break;
case Expired:
    player.sendMessage(api.getUtil().C("String_Node_Str"));
  break;
}
}
event.setCancelled(true);
}
 else {
if (event.getPlayer() != null) {
player=event.getPlayer();
}
Plot plot=manager.getPlotById(id,pmi);
if (plot == null) {
event.setCancelled(true);
}
 else {
if (player != null && !plot.isAllowed(player.getName(),player.getUniqueId())) {
event.setCancelled(true);
}
}
}
}
}
}

Fixed version (ground truth):
@EventHandler(priority=EventPriority.HIGH,ignoreCancelled=true) public void onBlockIgnite(BlockIgniteEvent event){
  if (event.getIgnitingEntity() == null) {
    return;
  }
  BukkitLocation location=new BukkitLocation(event.getBlock().getLocation());
  PlotMapInfo pmi=manager.getMap(location);
  if (pmi == null) {
    return;
  }
  if (pmi.isDisableIgnition()) {
    event.setCancelled(true);
  }
 else {
    String id=manager.getPlotId(location);
    if (id.isEmpty()) {
      event.setCancelled(true);
    }
 else {
      PlotToClear ptc=api.getPlotLocked(location.getWorld().getName(),id);
      Player player=null;
      if (ptc != null) {
        if (event.getPlayer() != null) {
          player=event.getPlayer();
switch (ptc.getReason()) {
case Clear:
            player.sendMessage(api.getUtil().C("String_Node_Str"));
          break;
case Reset:
        player.sendMessage(api.getUtil().C("String_Node_Str"));
      break;
case Expired:
    player.sendMessage(api.getUtil().C("String_Node_Str"));
  break;
}
}
event.setCancelled(true);
}
 else {
if (event.getPlayer() != null) {
player=event.getPlayer();
}
Plot plot=manager.getPlotById(id,pmi);
if (plot == null) {
event.setCancelled(true);
}
 else {
if (player != null && !plot.isAllowed(player.getName(),player.getUniqueId())) {
event.setCancelled(true);
}
}
}
}
}
}
Program: 42066
Project: 42066
Buggy source:
/** 
 * Setup PlotMe plugin hooks
 */
@Override public void setupHooks(){
  PluginManager pluginManager=plugin.getServer().getPluginManager();
  if (pluginManager.getPlugin("String_Node_Str") != null) {
    setupEconomy();
  }
  if (pluginManager.getPlugin("String_Node_Str") != null) {
    PlotMe_Core plotMeCore=plugin.getAPI();
    WorldEditPlugin worldEdit=(WorldEditPlugin)pluginManager.getPlugin("String_Node_Str");
    PlotWorldEdit we=null;
    try {
      we=new PlotWorldEdit(plotMeCore,worldEdit);
      setPlotWorldEdit(we);
    }
 catch (    SecurityException|IllegalArgumentException unused) {
      getLogger().warning("String_Node_Str");
      setPlotWorldEdit(null);
    }
    pluginManager.registerEvents(new BukkitPlotWorldEditListener(we,plugin),plugin);
  }
  setUsingLwc(pluginManager.getPlugin("String_Node_Str") != null);
}

Fixed version (ground truth):
/** 
 * Setup PlotMe plugin hooks
 */
@Override public void setupHooks(){
  PluginManager pluginManager=plugin.getServer().getPluginManager();
  if (pluginManager.getPlugin("String_Node_Str") != null) {
    setupEconomy();
  }
  if (pluginManager.getPlugin("String_Node_Str") != null) {
    PlotMe_Core plotMeCore=plugin.getAPI();
    WorldEditPlugin worldEdit=(WorldEditPlugin)pluginManager.getPlugin("String_Node_Str");
    PlotWorldEdit we=null;
    try {
      we=new PlotWorldEdit(worldEdit);
      setPlotWorldEdit(we);
    }
 catch (    SecurityException|IllegalArgumentException unused) {
      getLogger().warning("String_Node_Str");
      setPlotWorldEdit(null);
    }
    pluginManager.registerEvents(new BukkitPlotWorldEditListener(we,plugin),plugin);
  }
  setUsingLwc(pluginManager.getPlugin("String_Node_Str") != null);
}
Program: 42068
Project: 42068
Buggy source:
public PlotWorldEdit(PlotMe_Core instance,WorldEditPlugin worldEditPlugin){
  this.worldEdit=worldEditPlugin;
}

Fixed version (ground truth):
public PlotWorldEdit(WorldEditPlugin worldEditPlugin){
  this.worldEdit=worldEditPlugin;
}
Program: 42069
Project: 42069
Buggy source:
public boolean exec(IPlayer player,String[] args){
  if (player.hasPermission("String_Node_Str")) {
    if (plugin.getPlotMeCoreManager().isPlotWorld(player.getWorld())) {
      return true;
    }
 else {
      player.sendMessage(C("String_Node_Str"));
      return true;
    }
  }
 else {
    return false;
  }
}

Fixed version (ground truth):
public boolean exec(IPlayer player,String[] args){
  if (player.hasPermission("String_Node_Str")) {
    if (manager.isPlotWorld(player.getWorld())) {
      return true;
    }
 else {
      player.sendMessage(C("String_Node_Str"));
      return true;
    }
  }
 else {
    return false;
  }
}
Program: 42070
Project: 42070
Buggy source:
@EventHandler(priority=EventPriority.HIGH) public void onPlayerMove(PlayerMoveEvent event){
  BukkitPlayer player=(BukkitPlayer)plugin.wrapPlayer(event.getPlayer());
  if (PlotMeCoreManager.getInstance().isPlotWorld(player) && !player.hasPermission(PermissionNames.ADMIN_BYPASSDENY)) {
    BukkitLocation to=new BukkitLocation(event.getTo());
    String idTo=manager.getPlotId(to);
    if (!idTo.isEmpty()) {
      Plot plot=manager.getPlotById(idTo,player);
      if (plot != null && plot.isDeniedInternal(player.getName(),player.getUniqueId())) {
        Location t=event.getFrom().clone();
        t.setYaw(event.getTo().getYaw());
        t.setPitch(event.getTo().getPitch());
        event.setTo(t);
      }
    }
  }
}

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)) {
    BukkitLocation to=new BukkitLocation(event.getTo());
    String idTo=manager.getPlotId(to);
    if (!idTo.isEmpty()) {
      Plot plot=manager.getPlotById(idTo,player);
      if (plot != null && plot.isDeniedInternal(player.getName(),player.getUniqueId())) {
        Location t=event.getFrom().clone();
        t.setYaw(event.getTo().getYaw());
        t.setPitch(event.getTo().getPitch());
        event.setTo(t);
      }
    }
  }
}
Program: 42072
Project: 42072
Buggy source:
@Override public boolean addMultiverseWorld(String worldName,String environment,String seed,String generator){
  return getMultiverseWrapper().getMVWorldManager().addWorld(worldName,Environment.valueOf(environment),seed,generator);
}

Fixed version (ground truth):
@Override public boolean addMultiverseWorld(String worldName,String seed,String generator){
  return getMultiverseWrapper().getMVWorldManager().addWorld(worldName,seed,generator);
}
Program: 42073
Project: 42073
Buggy source:
public boolean addWorld(String name,World.Environment environment,String seedString,String generator){
  return worldManager.addWorld(name,environment,seedString,WorldType.FLAT,false,generator);
}

Fixed version (ground truth):
public boolean addWorld(String name,String seedString,String generator){
  return worldManager.addWorld(name,World.Environment.NORMAL,seedString,WorldType.FLAT,false,generator);
}
Program: 42074
Project: 42074
Buggy source:
@Override public void run(){
  if (getPlotToClear() != null) {
    IWorld world=plugin.getServerBridge().getWorld(getPlotToClear().getWorld());
    if (world != null) {
      if (currentClear == null) {
        currentClear=PlotMeCoreManager.getGenManager(world).clear(world,getPlotToClear().getPlotId(),plugin.getServerBridge().getConfig().getInt("String_Node_Str"),null);
      }
 else {
        currentClear=PlotMeCoreManager.getGenManager(world).clear(world,getPlotToClear().getPlotId(),plugin.getServerBridge().getConfig().getInt("String_Node_Str"),currentClear);
      }
      if (currentClear == null) {
        PlotMeCoreManager.getGenManager(world).adjustPlotFor(world,getPlotToClear().getPlotId(),true,false,false,false);
        if (plugin.getServerBridge().getUsinglwc()) {
          plugin.getPlotMeCoreManager().removeLWC(world,getPlotToClear().getPlotId());
        }
        PlotMeCoreManager.getGenManager(world).refreshPlotChunks(world,getPlotToClear().getPlotId());
        plottoclear.getRequester().sendMessage(plugin.getUtil().C("String_Node_Str") + "String_Node_Str" + getPlotToClear().getPlotId()+ "String_Node_Str"+ plugin.getUtil().C("String_Node_Str"));
        plugin.removePlotToClear(getPlotToClear(),taskId);
        plottoclear=null;
      }
    }
 else {
      plugin.removePlotToClear(getPlotToClear(),taskId);
      plottoclear=null;
    }
  }
}

Fixed version (ground truth):
@Override public void run(){
  if (getPlotToClear() != null) {
    IWorld world=plugin.getServerBridge().getWorld(getPlotToClear().getWorld());
    if (world != null) {
      if (currentClear == null) {
        currentClear=PlotMeCoreManager.getGenManager(world).clear(world,getPlotToClear().getPlotId(),plugin.getServerBridge().getConfig().getInt("String_Node_Str"),null);
      }
 else {
        currentClear=PlotMeCoreManager.getGenManager(world).clear(world,getPlotToClear().getPlotId(),plugin.getServerBridge().getConfig().getInt("String_Node_Str"),currentClear);
      }
      if (currentClear == null) {
        if (getPlotToClear().getReason() == ClearReason.Clear) {
          PlotMeCoreManager.getGenManager(world).adjustPlotFor(world,getPlotToClear().getPlotId(),false,false,false,false);
        }
 else {
          PlotMeCoreManager.getGenManager(world).adjustPlotFor(world,getPlotToClear().getPlotId(),true,false,false,false);
        }
        if (plugin.getServerBridge().getUsinglwc()) {
          plugin.getPlotMeCoreManager().removeLWC(world,getPlotToClear().getPlotId());
        }
        PlotMeCoreManager.getGenManager(world).refreshPlotChunks(world,getPlotToClear().getPlotId());
        plottoclear.getRequester().sendMessage(plugin.getUtil().C("String_Node_Str") + "String_Node_Str" + getPlotToClear().getPlotId()+ "String_Node_Str"+ plugin.getUtil().C("String_Node_Str"));
        plugin.removePlotToClear(getPlotToClear(),taskId);
        plottoclear=null;
      }
    }
 else {
      plugin.removePlotToClear(getPlotToClear(),taskId);
      plottoclear=null;
    }
  }
}
Program: 42075
Project: 42075
Buggy source:
private void setupWorld(String worldname){
  if (getGenManager(worldname) == null) {
    getLogger().log(Level.SEVERE,"String_Node_Str",worldname);
    getLogger().log(Level.SEVERE,"String_Node_Str",worldname);
  }
 else {
    PlotMapInfo pmi=new PlotMapInfo(this,worldname);
    IConfigSection config=getServerBridge().loadDefaultConfig("String_Node_Str" + worldname);
    config.set("String_Node_Str",null);
    config.set("String_Node_Str",null);
    plotMeCoreManager.addPlotMap(worldname,pmi);
  }
  if (getPlotMeCoreManager().getPlotMaps().isEmpty()) {
    getLogger().severe("String_Node_Str");
    getLogger().severe("String_Node_Str");
  }
}

Fixed version (ground truth):
private void setupWorld(String worldname){
  if (getGenManager(worldname.toLowerCase()) == null) {
    getLogger().log(Level.SEVERE,"String_Node_Str",worldname);
    getLogger().log(Level.SEVERE,"String_Node_Str",worldname);
  }
 else {
    PlotMapInfo pmi=new PlotMapInfo(this,worldname);
    IConfigSection config=getServerBridge().loadDefaultConfig("String_Node_Str" + worldname.toLowerCase());
    config.set("String_Node_Str",null);
    config.set("String_Node_Str",null);
    plotMeCoreManager.addPlotMap(worldname.toLowerCase(),pmi);
  }
  if (getPlotMeCoreManager().getPlotMaps().isEmpty()) {
    getLogger().severe("String_Node_Str");
    getLogger().severe("String_Node_Str");
  }
}
Program: 42076
Project: 42076
Buggy source:
public static IPlotMe_GeneratorManager getGenManager(String name){
  return managers.get(name);
}

Fixed version (ground truth):
public static IPlotMe_GeneratorManager getGenManager(String name){
  return managers.get(name.toLowerCase());
}
Program: 42077
Project: 42077
Buggy source:
public abstract boolean addMultiverseWorld(String worldName,String environment,String seed,String generator);

Fixed version (ground truth):
public abstract boolean addMultiverseWorld(String worldName,String seed,String generator);
Program: 42078
Project: 42078
Buggy source:
@Override public void setupListeners(){
  PluginManager pm=plugin.getServer().getPluginManager();
  pm.registerEvents(new BukkitPlotListener(plugin),plugin);
  pm.registerEvents(new BukkitPlotDenyListener(plugin),plugin);
}

Fixed version (ground truth):
@Override public void setupListeners(){
  PluginManager pm=plugin.getServer().getPluginManager();
  pm.registerEvents(new BukkitPlotListener(plugin.getAPI()),plugin);
  pm.registerEvents(new BukkitPlotDenyListener(plugin),plugin);
}
Program: 42079
Project: 42079
Buggy source:
@Override public void unHook(){
  economy=null;
}

Fixed version (ground truth):
@Override public void unHook(){
  economy=null;
  plotworldedit=null;
  usinglwc=false;
}
Program: 42080
Project: 42080
Buggy source:
@EventHandler(priority=EventPriority.HIGH,ignoreCancelled=true) public void onBlockPistonRetract(BlockPistonRetractEvent event){
  BukkitBlock piston=new BukkitBlock(event.getBlock());
  BukkitBlock block=new BukkitBlock(event.getRetractLocation().getBlock());
  if (api.getPlotMeCoreManager().isPlotWorld(piston) && piston.getType().equals(Material.PISTON_STICKY_BASE)) {
    String id=PlotMeCoreManager.getPlotId(block.getLocation());
    if (id.isEmpty()) {
      event.setCancelled(true);
    }
 else {
      PlotToClear ptc=api.getPlotLocked(piston.getWorld().getName(),id);
      if (ptc != null) {
        event.setCancelled(true);
      }
    }
  }
}

Fixed version (ground truth):
@EventHandler(priority=EventPriority.HIGH,ignoreCancelled=true) public void onBlockPistonRetract(BlockPistonRetractEvent event){
  BukkitBlock piston=new BukkitBlock(event.getBlock());
  BukkitBlock block=new BukkitBlock(event.getRetractLocation().getBlock());
  if (api.getPlotMeCoreManager().isPlotWorld(piston)) {
    String id=PlotMeCoreManager.getPlotId(block.getLocation());
    if (id.isEmpty()) {
      event.setCancelled(true);
    }
 else {
      PlotToClear ptc=api.getPlotLocked(piston.getWorld().getName(),id);
      if (ptc != null) {
        event.setCancelled(true);
      }
    }
  }
}
Program: 42081
Project: 42081
Buggy source:
@EventHandler(priority=EventPriority.LOWEST,ignoreCancelled=true) public void onPlayerMove(PlayerMoveEvent event){
  if (event.getTo() == null || event.getFrom() == null) {
    return;
  }
  BukkitLocation from=new BukkitLocation(event.getFrom());
  BukkitLocation to=new BukkitLocation(event.getTo());
  BukkitPlayer player=new BukkitPlayer(event.getPlayer());
  String idTo="String_Node_Str";
  boolean changemask=false;
  if (!from.getWorld().getName().equalsIgnoreCase(to.getWorld().getName())) {
    changemask=true;
  }
 else   if (from.getLocation() != to.getLocation()) {
    String idFrom=PlotMeCoreManager.getPlotId(from);
    idTo=PlotMeCoreManager.getPlotId(to);
    if (!idFrom.equals(idTo)) {
      changemask=true;
    }
  }
  if (changemask && api.getPlotMeCoreManager().isPlotWorld(to.getWorld())) {
    if (api.getPlotMeCoreManager().isPlayerIgnoringWELimit(player.getUniqueId())) {
      worldEdit.removeMask(player);
    }
 else {
      worldEdit.setMask(player,idTo);
    }
  }
}

Fixed version (ground truth):
@EventHandler(priority=EventPriority.LOWEST,ignoreCancelled=true) public void onPlayerMove(PlayerMoveEvent event){
  if (event.getTo() == null || event.getFrom() == null) {
    return;
  }
  BukkitLocation from=new BukkitLocation(event.getFrom());
  BukkitLocation to=new BukkitLocation(event.getTo());
  BukkitPlayer player=new BukkitPlayer(event.getPlayer());
  String idTo="String_Node_Str";
  boolean changemask=false;
  if (!from.getWorld().getName().equalsIgnoreCase(to.getWorld().getName())) {
    changemask=true;
  }
 else   if (from.getLocation() != to.getLocation()) {
    String idFrom=PlotMeCoreManager.getPlotId(from);
    idTo=PlotMeCoreManager.getPlotId(to);
    if (!idFrom.equals(idTo)) {
      changemask=true;
    }
  }
  if (changemask && api.getPlotMeCoreManager().isPlotWorld(to.getWorld())) {
    if (api.getPlotMeCoreManager().isPlayerIgnoringWELimit(player)) {
      worldEdit.removeMask(player);
    }
 else {
      worldEdit.setMask(player,idTo);
    }
  }
}
Program: 42082
Project: 42082
Buggy source:
@EventHandler(priority=EventPriority.LOW,ignoreCancelled=true) public void onPlayerInteract(PlayerInteractEvent event){
  BukkitPlayer player=new BukkitPlayer(event.getPlayer());
  BukkitLocation location=new BukkitLocation(event.getClickedBlock().getLocation());
  if (api.getPlotMeCoreManager().isPlotWorld(location)) {
    if (!player.hasPermission(PermissionNames.ADMIN_BUILDANYWHERE) && !api.getPlotMeCoreManager().isPlayerIgnoringWELimit(player.getUniqueId()) && (event.getAction() == Action.LEFT_CLICK_BLOCK || event.getAction() == Action.RIGHT_CLICK_BLOCK)&& ((BukkitMaterial)player.getItemInHand().getType()).getMaterial() != Material.AIR) {
      String id=PlotMeCoreManager.getPlotId(location);
      Plot plot=api.getPlotMeCoreManager().getMap(location).getPlot(id);
      if (plot != null && plot.isAllowed(player.getName(),player.getUniqueId())) {
        worldEdit.setMask(player);
      }
 else {
        player.sendMessage(api.getUtil().C("String_Node_Str"));
        event.setCancelled(true);
      }
    }
  }
}

Fixed version (ground truth):
@EventHandler(priority=EventPriority.LOW,ignoreCancelled=true) public void onPlayerInteract(PlayerInteractEvent event){
  BukkitPlayer player=new BukkitPlayer(event.getPlayer());
  BukkitLocation location=new BukkitLocation(event.getClickedBlock().getLocation());
  if (api.getPlotMeCoreManager().isPlotWorld(location)) {
    if (!player.hasPermission(PermissionNames.ADMIN_BUILDANYWHERE) && !api.getPlotMeCoreManager().isPlayerIgnoringWELimit(player) && (event.getAction() == Action.LEFT_CLICK_BLOCK || event.getAction() == Action.RIGHT_CLICK_BLOCK)&& ((BukkitMaterial)player.getItemInHand().getType()).getMaterial() != Material.AIR) {
      String id=PlotMeCoreManager.getPlotId(location);
      Plot plot=api.getPlotMeCoreManager().getMap(location).getPlot(id);
      if (plot != null && plot.isAllowed(player.getName(),player.getUniqueId())) {
        worldEdit.setMask(player);
      }
 else {
        player.sendMessage(api.getUtil().C("String_Node_Str"));
        event.setCancelled(true);
      }
    }
  }
}
Program: 42083
Project: 42083
Buggy source:
@EventHandler(priority=EventPriority.LOWEST,ignoreCancelled=true) public void onPlayerCommandPreprocess(PlayerCommandPreprocessEvent event){
  BukkitPlayer player=new BukkitPlayer(event.getPlayer());
  if (api.getPlotMeCoreManager().isPlotWorld(player)) {
    if (!api.getPlotMeCoreManager().isPlayerIgnoringWELimit(player.getUniqueId())) {
      if (event.getMessage().startsWith("String_Node_Str")) {
        player.sendMessage(api.getUtil().C("String_Node_Str"));
        event.setCancelled(true);
      }
 else       if (event.getMessage().startsWith("String_Node_Str")) {
        Plot plot=api.getPlotMeCoreManager().getPlotById(player);
        if (plot == null || !plot.isAllowed(player.getName(),player.getUniqueId())) {
          player.sendMessage(api.getUtil().C("String_Node_Str"));
          event.setCancelled(true);
        }
      }
    }
  }
}

Fixed version (ground truth):
@EventHandler(priority=EventPriority.LOWEST,ignoreCancelled=true) public void onPlayerCommandPreprocess(PlayerCommandPreprocessEvent event){
  BukkitPlayer player=new BukkitPlayer(event.getPlayer());
  if (api.getPlotMeCoreManager().isPlotWorld(player)) {
    if (!api.getPlotMeCoreManager().isPlayerIgnoringWELimit(player)) {
      if (event.getMessage().startsWith("String_Node_Str")) {
        player.sendMessage(api.getUtil().C("String_Node_Str"));
        event.setCancelled(true);
      }
 else       if (event.getMessage().startsWith("String_Node_Str")) {
        Plot plot=api.getPlotMeCoreManager().getPlotById(player);
        if (plot == null || !plot.isAllowed(player.getName(),player.getUniqueId())) {
          player.sendMessage(api.getUtil().C("String_Node_Str"));
          event.setCancelled(true);
        }
      }
    }
  }
}
Program: 42084
Project: 42084
Buggy source:
@EventHandler(priority=EventPriority.LOWEST,ignoreCancelled=true) public void onPlayerJoin(PlayerJoinEvent event){
  BukkitPlayer player=new BukkitPlayer(event.getPlayer());
  if (api.getPlotMeCoreManager().isPlotWorld(player)) {
    if (api.getPlotMeCoreManager().isPlayerIgnoringWELimit(player.getUniqueId())) {
      worldEdit.removeMask(player);
    }
 else {
      worldEdit.setMask(player);
    }
  }
 else {
    worldEdit.removeMask(player);
  }
}

Fixed version (ground truth):
@EventHandler(priority=EventPriority.LOWEST,ignoreCancelled=true) public void onPlayerJoin(PlayerJoinEvent event){
  BukkitPlayer player=new BukkitPlayer(event.getPlayer());
  if (api.getPlotMeCoreManager().isPlotWorld(player)) {
    if (api.getPlotMeCoreManager().isPlayerIgnoringWELimit(player)) {
      worldEdit.removeMask(player);
    }
 else {
      worldEdit.setMask(player);
    }
  }
 else {
    worldEdit.removeMask(player);
  }
}
Program: 42085
Project: 42085
Buggy source:
public void setPlotName(String plotName){
  this.plotName=plotName;
}

Fixed version (ground truth):
public void setPlotName(String plotName){
}
Program: 42086
Project: 42086
Buggy source:
public void removeAllowed(UUID uuid){
  if (allowed().contains(uuid)) {
    String name=allowed().remove(uuid);
    plugin.getSqlManager().deletePlotAllowed(PlotMeCoreManager.getIdX(getId()),PlotMeCoreManager.getIdZ(getId()),name,uuid,getWorld());
    if (plugin.getServerBridge().getPlotWorldEdit() != null) {
      IPlayer player=plugin.getServerBridge().getPlayer(uuid);
      if (player != null) {
        if (plugin.getPlotMeCoreManager().isPlotWorld(player.getWorld())) {
          if (plugin.getPlotMeCoreManager().isPlayerIgnoringWELimit(player.getUniqueId()))           plugin.getServerBridge().getPlotWorldEdit().removeMask(player);
 else           plugin.getServerBridge().getPlotWorldEdit().setMask(player);
        }
      }
    }
  }
}

Fixed version (ground truth):
public void removeAllowed(UUID uuid){
  if (allowed().contains(uuid)) {
    String name=allowed().remove(uuid);
    plugin.getSqlManager().deletePlotAllowed(PlotMeCoreManager.getIdX(getId()),PlotMeCoreManager.getIdZ(getId()),name,uuid,getWorld());
    if (plugin.getServerBridge().getPlotWorldEdit() != null) {
      IPlayer player=plugin.getServerBridge().getPlayer(uuid);
      if (player != null) {
        if (plugin.getPlotMeCoreManager().isPlotWorld(player.getWorld())) {
          if (plugin.getPlotMeCoreManager().isPlayerIgnoringWELimit(player))           plugin.getServerBridge().getPlotWorldEdit().removeMask(player);
 else           plugin.getServerBridge().getPlotWorldEdit().setMask(player);
        }
      }
    }
  }
}
Program: 42087
Project: 42087
Buggy source:
public boolean isPlayerIgnoringWELimit(UUID uuid){
  return getPlayersIgnoringWELimit().contains(uuid);
}

Fixed version (ground truth):
public boolean isPlayerIgnoringWELimit(IPlayer player){
  if (plugin.getServerBridge().getConfig().getBoolean("String_Node_Str")) {
    if (player.hasPermission(PermissionNames.ADMIN_WEANYWHERE)) {
      return !getPlayersIgnoringWELimit().contains(player.getUniqueId());
    }
 else {
      return getPlayersIgnoringWELimit().contains(player.getUniqueId());
    }
  }
 else {
    return getPlayersIgnoringWELimit().contains(player.getUniqueId());
  }
}
Program: 42088
Project: 42088
Buggy source:
public void clear(IWorld world,Plot plot,ICommandSender sender,ClearReason reason){
  String id=plot.getId();
  plot.setForSale(false);
  plot.setProtect(false);
  plot.setAuctioned(false);
  plot.setCurrentBid(0.0);
  plot.setCurrentBidder(null);
  String worldName=world.getName().toLowerCase();
  int idX=getIdX(id);
  int idZ=getIdZ(id);
  SqlManager sm=plugin.getSqlManager();
  sm.updatePlot(idX,idZ,worldName,"String_Node_Str",false);
  sm.updatePlot(idX,idZ,worldName,"String_Node_Str",false);
  sm.updatePlot(idX,idZ,worldName,"String_Node_Str",false);
  sm.updatePlot(idX,idZ,worldName,"String_Node_Str",0);
  sm.updatePlot(idX,idZ,worldName,"String_Node_Str",null);
  if (getMap(worldName).isUseProgressiveClear()) {
    plugin.addPlotToClear(new PlotToClear(worldName,id,reason));
  }
 else {
    getGenManager(world).clear(world,id);
    if (plugin.getServerBridge().getUsinglwc()) {
      removeLWC(world,id);
    }
    sender.sendMessage(Util().C("String_Node_Str"));
  }
}

Fixed version (ground truth):
public void clear(IWorld world,Plot plot,ICommandSender sender,ClearReason reason){
}
Program: 42089
Project: 42089
Buggy source:
public boolean exec(IPlayer player,String[] args){
  if (plugin.getPlotMeCoreManager().isPlotWorld(player)) {
    if (player.hasPermission(PermissionNames.USER_BIOME)) {
      List<String> biomes=serverBridge.getBiomes();
      Collections.sort(biomes);
      int page=1;
      int pages=biomes.size() / 19 + 1;
      if (args.length > 1 && !args[1].isEmpty()) {
        page=Integer.parseInt(args[1]);
      }
      if (page <= pages) {
        page=1;
      }
      player.sendMessage(C("String_Node_Str") + "String_Node_Str" + page+ "String_Node_Str"+ pages+ "String_Node_Str");
      for (int ctr=0; ctr < 19; ctr++) {
        if (biomes.size() <= ctr + (page - 1) * 19) {
          return true;
        }
 else {
          player.sendMessage("String_Node_Str" + biomes.get(ctr + (page - 1) * 19));
        }
      }
    }
 else {
      player.sendMessage("String_Node_Str" + C("String_Node_Str"));
      return false;
    }
  }
  return true;
}

Fixed version (ground truth):
public boolean exec(IPlayer player,String arg){
  if (plugin.getPlotMeCoreManager().isPlotWorld(player)) {
    if (player.hasPermission(PermissionNames.USER_BIOME)) {
      List<String> biomes=serverBridge.getBiomes();
      int pages=biomes.size() / 19 + 1;
      int page;
      try {
        page=Integer.parseInt(arg);
      }
 catch (      NumberFormatException e) {
        page=1;
      }
      player.sendMessage(C("String_Node_Str") + "String_Node_Str" + page+ "String_Node_Str"+ pages+ "String_Node_Str");
      for (int ctr=0; ctr < 19; ctr++) {
        if (biomes.size() <= ctr + (page - 1) * 19) {
          return true;
        }
 else {
          player.sendMessage("String_Node_Str" + biomes.get(ctr + (page - 1) * 19));
        }
      }
    }
 else {
      player.sendMessage("String_Node_Str" + C("String_Node_Str"));
      return false;
    }
  }
  return true;
}
Program: 42091
Project: 42091
Buggy source:
public BukkitPlotListener(PlotMe_CorePlugin instance){
  plugin=instance;
  api=plugin.getAPI();
}

Fixed version (ground truth):
public BukkitPlotListener(PlotMe_Core instance){
  api=instance;
}