nus-yam/ex-repair huggingface dataset:
Program: 93781
Project: 93781
Buggy source:
/** 
 * @param player
 * @param from
 * @param to
 * @param cause
 */
public ACTeleportEvent(Player player,Location from,Location to,TeleportCause cause){
  super(player,from,to,cause);
}

Fixed version (ground truth):
/** 
 * @param player
 * @param from
 * @param to
 * @param cause
 */
public ACTeleportEvent(final Player player,final Location from,final Location to,final TeleportCause cause){
  super(player,from,to,cause);
}
Program: 93782
Project: 93782
Buggy source:
/** 
 * Add a permission Child to the Permission Parent
 * @param perm
 * @return the PermParent (this)
 */
public PermParent addChild(String perm){
  PermChild child=new PermChild(perm);
  child.registerPermission();
  child.parent=this;
  children.add(child);
  return this;
}

Fixed version (ground truth):
/** 
 * Add a permission Child to the Permission Parent
 * @param perm
 * @return the PermParent (this)
 */
public PermParent addChild(String perm){
  PermChild child=new PermChild(perm);
  child.registerPermission();
  child.parent=this;
  children.add(child);
  registered=false;
  return this;
}
Program: 93783
Project: 93783
Buggy source:
/** 
 * Check if the user have the permission to use this Egg
 * @param player
 * @return
 * @throws DontHaveThePermissionException when the player don't have the permission, with the message to display to the user
 */
protected boolean checkPermission(Player player) throws DontHaveThePermissionException {
  String perm;
  if (this.getClass().isAnnotationPresent(EggPermission.class))   perm=this.getClass().getAnnotation(EggPermission.class).permission();
 else {
    String simpleName=this.getClass().getSimpleName();
    perm=simpleName.substring(0,simpleName.length() - 4).toLowerCase();
  }
  if (perm == null || (perm != null && perm.isEmpty()))   return true;
  if (!PermissionManager.hasPerm(player,perm,false))   throw new DontHaveThePermissionException(Utils.I18n("String_Node_Str","String_Node_Str",perm));
  return true;
}

Fixed version (ground truth):
/** 
 * Check if the user have the permission to use this Egg
 * @param player
 * @return
 * @throws DontHaveThePermissionException when the player don't have the permission, with the message to display to the user
 */
protected boolean checkPermission(Player player) throws DontHaveThePermissionException {
  String perm;
  if (this.getClass().isAnnotationPresent(EggPermission.class))   perm=this.getClass().getAnnotation(EggPermission.class).permission();
 else {
    String simpleName=this.getClass().getSimpleName();
    perm="String_Node_Str" + simpleName.substring(0,simpleName.length() - 3).toLowerCase();
  }
  if (perm == null || (perm != null && perm.isEmpty()))   return true;
  if (!PermissionManager.hasPerm(player,perm,false))   throw new DontHaveThePermissionException(Utils.I18n("String_Node_Str","String_Node_Str",perm));
  return true;
}
Program: 93784
Project: 93784
Buggy source:
/** 
 * Add a Package that containing the EggType class. The Class must have a name that finish by Egg.
 * @param packageName
 */
@SuppressWarnings("String_Node_Str") public synchronized static void addPackage(Plugin plugin,String packageName){
  PermissionLinker linker=PermissionLinker.getPermissionLinker(plugin.getDescription().getName());
  PermParent parent=new PermParent("String_Node_Str");
  linker.addPermParent(parent);
  linker.setMajorPerm(new PermParent("String_Node_Str"));
  for (  Class<?> clazz : getClassesInPackage(packageName,plugin.getClass().getClassLoader()))   if (EggType.class.isAssignableFrom(clazz)) {
    if (clazz.isAnnotationPresent(EggPermission.class)) {
      EggPermission annotation=clazz.getAnnotation(EggPermission.class);
      if (!annotation.permission().isEmpty())       parent.addChild(annotation.permission());
    }
 else {
      String simpleName=clazz.getSimpleName();
      parent.addChild("String_Node_Str" + simpleName.substring(0,simpleName.length() - 4).toLowerCase());
    }
    classes.put(clazz.getName(),(Class<? extends EggType<?>>)clazz);
    classesSimpleName.put(clazz.getSimpleName(),(Class<? extends EggType<?>>)clazz);
  }
  linker.registerAllPermParent();
}

Fixed version (ground truth):
/** 
 * Add a Package that containing the EggType class. The Class must have a name that finish by Egg.
 * @param packageName
 */
@SuppressWarnings("String_Node_Str") public synchronized static void addPackage(Plugin plugin,String packageName){
  PermissionLinker linker=PermissionLinker.getPermissionLinker(plugin.getDescription().getName());
  PermParent parent=new PermParent("String_Node_Str");
  linker.addPermParent(parent);
  linker.setMajorPerm(new PermParent("String_Node_Str"));
  for (  Class<?> clazz : getClassesInPackage(packageName,plugin.getClass().getClassLoader()))   if (EggType.class.isAssignableFrom(clazz)) {
    if (clazz.isAnnotationPresent(EggPermission.class)) {
      EggPermission annotation=clazz.getAnnotation(EggPermission.class);
      if (!annotation.permission().isEmpty())       parent.addChild(annotation.permission());
    }
 else {
      String simpleName=clazz.getSimpleName();
      parent.addChild("String_Node_Str" + simpleName.substring(0,simpleName.length() - 3).toLowerCase());
    }
    classes.put(clazz.getName(),(Class<? extends EggType<?>>)clazz);
    classesSimpleName.put(clazz.getSimpleName(),(Class<? extends EggType<?>>)clazz);
  }
  linker.registerAllPermParent();
}
Program: 93785
Project: 93785
Buggy source:
@EventHandler public void onPlayerQuit(PlayerQuitEvent event){
  final Player p=event.getPlayer();
  final ACPlayer player=ACPlayer.getPlayer(p);
  player.setInformation("String_Node_Str",System.currentTimeMillis());
  player.setInformation("String_Node_Str",ACHelper.getInstance().getLimit(p,"String_Node_Str"));
  if (ConfigEnum.JQMSG.getBoolean() && !SuperPermissions.isApiSet()) {
    final HashMap<String,String> replace=new HashMap<String,String>();
    replace.put("String_Node_Str",Utils.getPlayerName(p,null,true));
    event.setQuitMessage(Utils.I18n("String_Node_Str",replace));
  }
  if (player.hasPower(Type.FAKEQUIT))   event.setQuitMessage(null);
 else   if (InvisibleWorker.getInstance().hasInvisiblePowers(p.getName()))   event.setQuitMessage(null);
  PlayerManager.getInstance().setOffline(player);
  ACHelper.getInstance().removeDisconnectedPlayer(p);
}

Fixed version (ground truth):
@EventHandler public void onPlayerQuit(PlayerQuitEvent event){
  final Player p=event.getPlayer();
  final ACPlayer player=ACPlayer.getPlayer(p);
  player.setInformation("String_Node_Str",System.currentTimeMillis());
  int imLvl=ACHelper.getInstance().getLimit(p,"String_Node_Str","String_Node_Str");
  player.setInformation("String_Node_Str",imLvl == Integer.MAX_VALUE ? ConfigEnum.DIMMUNITY : imLvl);
  if (ConfigEnum.JQMSG.getBoolean() && !SuperPermissions.isApiSet()) {
    final HashMap<String,String> replace=new HashMap<String,String>();
    replace.put("String_Node_Str",Utils.getPlayerName(p,null,true));
    event.setQuitMessage(Utils.I18n("String_Node_Str",replace));
  }
  if (player.hasPower(Type.FAKEQUIT))   event.setQuitMessage(null);
 else   if (InvisibleWorker.getInstance().hasInvisiblePowers(p.getName()))   event.setQuitMessage(null);
  PlayerManager.getInstance().setOffline(player);
  ACHelper.getInstance().removeDisconnectedPlayer(p);
}
Program: 93788
Project: 93788
Buggy source:
@Override public void onPlayerTeleport(PlayerTeleportEvent event){
  if (event.isCancelled())   return;
  Location from=event.getFrom();
  Location to=event.getTo();
  String playername=event.getPlayer().getName();
  boolean otherWorld=!from.getWorld().equals(to.getWorld());
  ACPlayer player=ACPlayer.getPlayer(playername);
  if (otherWorld) {
    player.setLastLocation(from);
  }
  if (player.hasPower(Type.FROZEN)) {
    event.setCancelled(true);
    return;
  }
  playerRespawnOrJoin(event.getPlayer());
}

Fixed version (ground truth):
@Override public void onPlayerTeleport(PlayerTeleportEvent event){
  if (event.isCancelled())   return;
  Location from=event.getFrom();
  Location to=event.getTo();
  boolean otherWorld=!from.getWorld().equals(to.getWorld());
  ACPlayer player=ACPlayer.getPlayer(event.getPlayer());
  if (otherWorld) {
    player.setLastLocation(from);
  }
  if (player.hasPower(Type.FROZEN)) {
    event.setCancelled(true);
    return;
  }
  playerRespawnOrJoin(event.getPlayer());
}
Program: 93789
Project: 93789
Buggy source:
@Override public void onPlayerChangedWorld(PlayerChangedWorldEvent event){
  ACPlayer player=ACPlayer.getPlayer(event.getPlayer());
  if (ACHelper.getInstance().getConfBoolean("String_Node_Str") && !PermissionManager.hasPerm(player.getHandler(),"String_Node_Str",false)) {
    player.removeAllSuperPower();
    if (InvisibleWorker.getInstance().hasInvisiblePowers(player.getName())) {
      InvisibleWorker.getInstance().reappear(event.getPlayer());
    }
    Utils.sI18n(event.getPlayer(),"String_Node_Str");
  }
}

Fixed version (ground truth):
@Override public void onPlayerChangedWorld(PlayerChangedWorldEvent event){
  ACPlayer player=ACPlayer.getPlayer(event.getPlayer());
  if (ACHelper.getInstance().getConfBoolean("String_Node_Str") && !PermissionManager.hasPerm(event.getPlayer(),"String_Node_Str",false)) {
    player.removeAllSuperPower();
    if (InvisibleWorker.getInstance().hasInvisiblePowers(player.getName())) {
      InvisibleWorker.getInstance().reappear(event.getPlayer());
    }
    Utils.sI18n(event.getPlayer(),"String_Node_Str");
  }
}
Program: 93790
Project: 93790
Buggy source:
public void setOnline(Player player){
  playerFactory.addExistingPlayer(player.getName());
  onlinePlayers.put(demandACPlayer(player),true);
  DebugLog.INSTANCE.info(player.getName() + "String_Node_Str");
}

Fixed version (ground truth):
public ACPlayer setOnline(Player player){
  playerFactory.addExistingPlayer(player.getName());
  ACPlayer acPlayer=demandACPlayer(player);
  onlinePlayers.put(acPlayer,true);
  DebugLog.INSTANCE.info(player.getName() + "String_Node_Str");
  return acPlayer;
}
Program: 93791
Project: 93791
Buggy source:
ACPlayer demandACPlayer(Player player){
  if (player == null)   return getPlayer("String_Node_Str");
  String playerName=player.getName();
  ACPlayer result=getPlayer(playerName);
  if (result == null) {
    result=playerFactory.createPlayer(player);
    addPlayer(result);
    result=getPlayer(playerName);
  }
 else   if (result instanceof EmptyPlayer) {
    ACPlayer tmp=playerFactory.createPlayer(player);
    if (tmp.equals(result))     return result;
    result=tmp;
    players.remove(playerName);
    addPlayer(result);
    result=getPlayer(playerName);
  }
  return result;
}

Fixed version (ground truth):
ACPlayer demandACPlayer(Player player){
  if (player == null)   return getPlayer("String_Node_Str");
  String playerName=player.getName();
  ACPlayer result=getPlayer(playerName);
  if (result == null) {
    result=playerFactory.createPlayer(player);
    addPlayer(result);
    result=getPlayer(playerName);
  }
 else   if (result instanceof EmptyPlayer) {
    ACPlayer tmp=playerFactory.createPlayer(playerName);
    if (tmp instanceof EmptyPlayer)     return result;
    players.remove(playerName);
    onlinePlayers.remove(result);
    result=tmp;
    addPlayer(result);
    result=getPlayer(playerName);
  }
  return result;
}
Program: 93794
Project: 93794
Buggy source:
@Override public void onPlayerTeleport(PlayerTeleportEvent event){
  if (event.isCancelled())   return;
  Location from=event.getFrom();
  Location to=event.getTo();
  String playername=event.getPlayer().getName();
  boolean otherWorld=!from.getWorld().equals(to.getWorld());
  ACPlayer player=ACPlayer.getPlayer(playername);
  if (otherWorld) {
    player.setLastLocation(from);
  }
  if (player.hasPower(Type.FROZEN)) {
    event.setCancelled(true);
    return;
  }
  playerRespawnOrJoin(event.getPlayer());
}

Fixed version (ground truth):
@Override public void onPlayerTeleport(PlayerTeleportEvent event){
  if (event.isCancelled())   return;
  Location from=event.getFrom();
  Location to=event.getTo();
  boolean otherWorld=!from.getWorld().equals(to.getWorld());
  ACPlayer player=ACPlayer.getPlayer(event.getPlayer());
  if (otherWorld) {
    player.setLastLocation(from);
  }
  if (player.hasPower(Type.FROZEN)) {
    event.setCancelled(true);
    return;
  }
  playerRespawnOrJoin(event.getPlayer());
}
Program: 93795
Project: 93795
Buggy source:
@Override public void onPlayerChangedWorld(PlayerChangedWorldEvent event){
  ACPlayer player=ACPlayer.getPlayer(event.getPlayer());
  if (ACHelper.getInstance().getConfBoolean("String_Node_Str") && !PermissionManager.hasPerm(player.getHandler(),"String_Node_Str",false)) {
    player.removeAllSuperPower();
    if (InvisibleWorker.getInstance().hasInvisiblePowers(player.getName())) {
      InvisibleWorker.getInstance().reappear(event.getPlayer());
    }
    Utils.sI18n(event.getPlayer(),"String_Node_Str");
  }
}

Fixed version (ground truth):
@Override public void onPlayerChangedWorld(PlayerChangedWorldEvent event){
  ACPlayer player=ACPlayer.getPlayer(event.getPlayer());
  if (ACHelper.getInstance().getConfBoolean("String_Node_Str") && !PermissionManager.hasPerm(event.getPlayer(),"String_Node_Str",false)) {
    player.removeAllSuperPower();
    if (InvisibleWorker.getInstance().hasInvisiblePowers(player.getName())) {
      InvisibleWorker.getInstance().reappear(event.getPlayer());
    }
    Utils.sI18n(event.getPlayer(),"String_Node_Str");
  }
}
Program: 93796
Project: 93796
Buggy source:
public void setOnline(Player player){
  playerFactory.addExistingPlayer(player.getName());
  onlinePlayers.put(demandACPlayer(player),true);
  DebugLog.INSTANCE.info(player.getName() + "String_Node_Str");
}

Fixed version (ground truth):
public ACPlayer setOnline(Player player){
  playerFactory.addExistingPlayer(player.getName());
  ACPlayer acPlayer=demandACPlayer(player);
  onlinePlayers.put(acPlayer,true);
  DebugLog.INSTANCE.info(player.getName() + "String_Node_Str");
  return acPlayer;
}
Program: 93797
Project: 93797
Buggy source:
ACPlayer demandACPlayer(Player player){
  if (player == null)   return getPlayer("String_Node_Str");
  String playerName=player.getName();
  ACPlayer result=getPlayer(playerName);
  if (result == null) {
    result=playerFactory.createPlayer(player);
    addPlayer(result);
    result=getPlayer(playerName);
  }
 else   if (result instanceof EmptyPlayer) {
    ACPlayer tmp=playerFactory.createPlayer(player);
    if (tmp.equals(result))     return result;
    result=tmp;
    players.remove(playerName);
    addPlayer(result);
    result=getPlayer(playerName);
  }
  return result;
}

Fixed version (ground truth):
ACPlayer demandACPlayer(Player player){
  if (player == null)   return getPlayer("String_Node_Str");
  String playerName=player.getName();
  ACPlayer result=getPlayer(playerName);
  if (result == null) {
    result=playerFactory.createPlayer(player);
    addPlayer(result);
    result=getPlayer(playerName);
  }
 else   if (result instanceof EmptyPlayer) {
    ACPlayer tmp=playerFactory.createPlayer(playerName);
    if (tmp instanceof EmptyPlayer)     return result;
    players.remove(playerName);
    onlinePlayers.remove(result);
    result=tmp;
    addPlayer(result);
    result=getPlayer(playerName);
  }
  return result;
}
Program: 93798
Project: 93798
Buggy source:
/** 
 * Get the complete player name with all prefix
 * @param player player to get the name
 * @param sender sender that want the name
 * @param withPrefix return the name with or without prefixes (e.g [INV])
 * @return the complete player name with prefix
 */
public static String getPlayerName(Player player,CommandSender sender,boolean withPrefix){
  if (withPrefix) {
    String prefix=colorParser(getPrefix(player,sender));
    if (ACHelper.getInstance().getConfBoolean("String_Node_Str"))     return prefix + player.getDisplayName() + "String_Node_Str";
    return prefix + player.getName() + "String_Node_Str";
  }
  if (ACHelper.getInstance().getConfBoolean("String_Node_Str"))   return player.getDisplayName();
  return player.getName();
}

Fixed version (ground truth):
/** 
 * Get the complete player name with all prefix
 * @param player player to get the name
 * @param sender sender that want the name
 * @param withPrefix return the name with or without prefixes (e.g [INV])
 * @return the complete player name with prefix
 */
public static String getPlayerName(Player player,CommandSender sender,boolean withPrefix){
  if (withPrefix) {
    String prefix=colorParser(getPrefix(player,sender));
    if (ACHelper.getInstance().getConfBoolean("String_Node_Str"))     return prefix + player.getDisplayName() + ChatColor.YELLOW;
    return prefix + player.getName() + ChatColor.YELLOW;
  }
  if (ACHelper.getInstance().getConfBoolean("String_Node_Str"))   return ChatColor.WHITE + player.getDisplayName();
  return ChatColor.WHITE + player.getName();
}
Program: 93799
Project: 93799
Buggy source:
/** 
 * Get the complete player name with all prefix
 * @param player player to get the name
 * @param sender sender that want the name
 * @param withPrefix return the name with or without prefixes (e.g [INV])
 * @return the complete player name with prefix
 */
public static String getPlayerName(Player player,CommandSender sender,boolean withPrefix){
  if (withPrefix) {
    String prefix=colorParser(getPrefix(player,sender));
    if (ACHelper.getInstance().getConfBoolean("String_Node_Str"))     return prefix + player.getDisplayName();
    return prefix + player.getName();
  }
  if (ACHelper.getInstance().getConfBoolean("String_Node_Str"))   return player.getDisplayName();
  return player.getName();
}

Fixed version (ground truth):
/** 
 * Get the complete player name with all prefix
 * @param player player to get the name
 * @param sender sender that want the name
 * @param withPrefix return the name with or without prefixes (e.g [INV])
 * @return the complete player name with prefix
 */
public static String getPlayerName(Player player,CommandSender sender,boolean withPrefix){
  if (withPrefix) {
    String prefix=colorParser(getPrefix(player,sender));
    if (ACHelper.getInstance().getConfBoolean("String_Node_Str"))     return prefix + player.getDisplayName() + "String_Node_Str";
    return prefix + player.getName() + "String_Node_Str";
  }
  if (ACHelper.getInstance().getConfBoolean("String_Node_Str"))   return player.getDisplayName();
  return player.getName();
}
Program: 93800
Project: 93800
Buggy source:
@Override public String getPrefix(Player player){
  String prefix="String_Node_Str";
  for (  PermissionGroup group : PEX.getUser(player).getGroups())   if ((prefix=group.getPrefix()) != null && !prefix.isEmpty())   break;
  return prefix;
}

Fixed version (ground truth):
@Override public String getPrefix(Player player){
  PermissionUser user=PEX.getUser(player);
  if (user != null)   return user.getPrefix() == null ? "String_Node_Str" : user.getPrefix();
  String prefix="String_Node_Str";
  for (  PermissionGroup group : PEX.getUser(player).getGroups())   if ((prefix=group.getPrefix()) != null && !prefix.isEmpty())   break;
  return prefix;
}
Program: 93803
Project: 93803
Buggy source:
/** 
 * Get ItemStacks for given kit
 * @param kit
 * @return
 */
public ArrayList<ItemStack> getItemStacks(){
  ArrayList<ItemStack> result=new ArrayList<ItemStack>();
  try {
  }
 catch (  Throwable e) {
  }
  for (  MaterialContainer mc : items)   result.add(mc.getItemStack());
  return result;
}

Fixed version (ground truth):
/** 
 * Get ItemStacks for given kit
 * @param kit
 * @return
 */
public List<ItemStack> getItemStacks(){
  ArrayList<ItemStack> result=new ArrayList<ItemStack>();
  try {
  }
 catch (  Throwable e) {
  }
  for (  MaterialContainer mc : items)   result.add(mc.getItemStack());
  return result;
}
Program: 93804
Project: 93804
Buggy source:
public KitInstance(String name,int delay,List<MaterialContainer> items){
  this.name=name;
  this.delay=delay;
  this.items=items;
}

Fixed version (ground truth):
public KitInstance(String name,int delay,List<MaterialContainer> items){
  this.name=name;
  this.delay=delay;
  this.items=items;
  ACPluginManager.getPluginInstance("String_Node_Str").getPermissionLinker().addOnTheFly("String_Node_Str" + name,"String_Node_Str");
}
Program: 93805
Project: 93805
Buggy source:
/** 
 * @param afkTime the afkTime to set
 */
public void setAfkTime(int afkTime){
  if (afkTime > 0)   this.afkTime=afkTime * 1000;
}

Fixed version (ground truth):
/** 
 * @param afkTime the afkTime to set
 */
public void setAfkTime(int afkTime){
  if (afkTime > 0) {
    this.afkTime=afkTime * 1000;
    if (this.afkTime > this.kickTime)     playerTimeStamp=new MapMaker().expiration(afkTime + 60000,TimeUnit.MILLISECONDS).makeMap();
  }
}
Program: 93806
Project: 93806
Buggy source:
/** 
 * @param kickTime the kickTime to set
 */
public void setKickTime(int kickTime){
  if (afkTime > 0) {
    this.kickTime=kickTime * 1000 * 60;
    playerTimeStamp=new MapMaker().expiration(kickTime + 60000,TimeUnit.MILLISECONDS).makeMap();
  }
}

Fixed version (ground truth):
/** 
 * @param kickTime the kickTime to set
 */
public void setKickTime(int kickTime){
  if (afkTime > 0) {
    this.kickTime=kickTime * 1000 * 60;
    if (this.kickTime > this.afkTime)     playerTimeStamp=new MapMaker().expiration(kickTime + 60000,TimeUnit.MILLISECONDS).makeMap();
  }
}
Program: 93807
Project: 93807
Buggy source:
@Override public void onPlayerInteract(PlayerInteractEvent event){
  Player p=event.getPlayer();
  if (ACHelper.getInstance().getConfBoolean("String_Node_Str")) {
    AFKWorker.getInstance().updateTimeStamp(p);
    if (AFKWorker.getInstance().isAfk(p))     AFKWorker.getInstance().setOnline(p);
  }
  ACPlayer player=ACPlayer.getPlayer(p.getName());
  if (player.hasPower(Type.FROZEN)) {
    event.setCancelled(true);
    return;
  }
  ItemStack itemInHand=event.getItem();
  if (itemInHand != null && event.getAction() == Action.LEFT_CLICK_BLOCK && itemInHand.getTypeId() == ACHelper.getInstance().getConfInt("String_Node_Str") && player.hasPower(Type.SUPER_BREAKER)) {
    superBreaker(player,event.getClickedBlock());
    return;
  }
  if (((event.getAction() == Action.LEFT_CLICK_BLOCK) || (event.getAction() == Action.LEFT_CLICK_AIR))) {
    if (player.hasPower(Type.THOR))     p.getWorld().strikeLightning(p.getTargetBlock(null,600).getLocation());
    Float power=null;
    if ((power=player.getPower(Type.VULCAN).getFloat(0)) != 0)     p.getWorld().createExplosion(p.getTargetBlock(null,600).getLocation(),power,true);
    power=null;
    if ((power=player.getPower(Type.FIREBALL).getFloat(0)) != 0)     ShootFireball.shoot(p,power);
    tpAtSee(player);
  }
}

Fixed version (ground truth):
@Override public void onPlayerInteract(PlayerInteractEvent event){
  Player p=event.getPlayer();
  if (ACHelper.getInstance().getConfBoolean("String_Node_Str")) {
    AFKWorker.getInstance().updateTimeStamp(p);
    if (AFKWorker.getInstance().isAfk(p))     AFKWorker.getInstance().setOnline(p);
  }
  ACPlayer player=ACPlayer.getPlayer(p.getName());
  if (player.hasPower(Type.FROZEN)) {
    event.setCancelled(true);
    return;
  }
  if (((event.getAction() == Action.LEFT_CLICK_BLOCK) || (event.getAction() == Action.LEFT_CLICK_AIR))) {
    if (player.hasPower(Type.THOR))     p.getWorld().strikeLightning(p.getTargetBlock(null,600).getLocation());
    Float power=null;
    if ((power=player.getPower(Type.VULCAN).getFloat(0)) != 0)     p.getWorld().createExplosion(p.getTargetBlock(null,600).getLocation(),power,true);
    power=null;
    if ((power=player.getPower(Type.FIREBALL).getFloat(0)) != 0)     ShootFireball.shoot(p,power);
    tpAtSee(player);
  }
}
Program: 93809
Project: 93809
Buggy source:
@Override public void onPlayerQuit(PlayerQuitEvent event){
  Player p=event.getPlayer();
  ACPlayer player=ACPlayer.getPlayer(p.getName());
  player.setInformation("String_Node_Str",ACHelper.getInstance().getLimit(p,"String_Node_Str"));
  PlayerManager.getInstance().setOffline(ACPlayer.getPlayer(p.getName()));
  if (player.hasPower(Type.FAKEQUIT))   event.setQuitMessage(null);
 else   if (InvisibleWorker.getInstance().hasInvisiblePowers(p.getName()))   event.setQuitMessage(null);
  if (ACHelper.getInstance().getConfBoolean("String_Node_Str")) {
    AFKWorker.getInstance().removePlayer(p);
  }
}

Fixed version (ground truth):
@Override public void onPlayerQuit(PlayerQuitEvent event){
  Player p=event.getPlayer();
  ACPlayer player=ACPlayer.getPlayer(p.getName());
  player.setInformation("String_Node_Str",ACHelper.getInstance().getLimit(p,"String_Node_Str"));
  PlayerManager.getInstance().setOffline(ACPlayer.getPlayer(p.getName()));
  if (player.hasPower(Type.FAKEQUIT))   event.setQuitMessage(null);
 else   if (InvisibleWorker.getInstance().hasInvisiblePowers(p.getName()))   event.setQuitMessage(null);
  AFKWorker.getInstance().removePlayer(p);
}
Program: 93810
Project: 93810
Buggy source:
/** 
 * @param afkTime the afkTime to set
 */
public void setAfkTime(int afkTime){
  if (afkTime > 0) {
    this.afkTime=afkTime * 1000;
    if (this.afkTime > this.kickTime)     playerTimeStamp=new MapMaker().expiration(afkTime + 60000,TimeUnit.MILLISECONDS).makeMap();
  }
}

Fixed version (ground truth):
/** 
 * @param afkTime the afkTime to set
 */
public void setAfkTime(int afkTime){
  if (afkTime > 0)   this.afkTime=afkTime * 1000;
}
Program: 93811
Project: 93811
Buggy source:
/** 
 * @param kickTime the kickTime to set
 */
public void setKickTime(int kickTime){
  if (afkTime > 0) {
    this.kickTime=kickTime * 1000 * 60;
    if (this.kickTime > this.afkTime)     playerTimeStamp=new MapMaker().expiration(kickTime + 60000,TimeUnit.MILLISECONDS).makeMap();
  }
}

Fixed version (ground truth):
/** 
 * @param kickTime the kickTime to set
 */
public void setKickTime(int kickTime){
  if (afkTime > 0)   this.kickTime=kickTime * 1000 * 60;
}
Program: 93812
Project: 93812
Buggy source:
@Override public void execute(CommandSender sender,CommandArgs args){
  int dice=6;
  if (args.length >= 1) {
    try {
      dice=args.getInt(0);
    }
 catch (    NumberFormatException e) {
    }
  }
  Random rand=new Random();
  HashMap<String,String> replace=new HashMap<String,String>();
  replace.put("String_Node_Str",String.valueOf(dice));
  if (Utils.isPlayer(sender,false))   replace.put("String_Node_Str",((Player)sender).getDisplayName());
 else   replace.put("String_Node_Str","String_Node_Str");
  replace.put("String_Node_Str",String.valueOf(rand.nextInt(dice) + 1));
  Utils.broadcastMessage(Utils.I18n("String_Node_Str",replace));
}

Fixed version (ground truth):
@Override public void execute(CommandSender sender,CommandArgs args){
  int dice=6;
  if (args.length >= 1 && args.getInt(0) >= 1) {
    try {
      dice=args.getInt(0);
    }
 catch (    NumberFormatException e) {
    }
  }
  Random rand=new Random();
  HashMap<String,String> replace=new HashMap<String,String>();
  replace.put("String_Node_Str",String.valueOf(dice));
  if (Utils.isPlayer(sender,false))   replace.put("String_Node_Str",((Player)sender).getDisplayName());
 else   replace.put("String_Node_Str","String_Node_Str");
  replace.put("String_Node_Str",String.valueOf(rand.nextInt(dice) + 1));
  Utils.broadcastMessage(Utils.I18n("String_Node_Str",replace));
}
Program: 93813
Project: 93813
Buggy source:
@Override public void onEntityDeath(EntityDeathEvent event){
  if (!(event.getEntity() instanceof Player))   return;
  Player player=(Player)event.getEntity();
  ACHelper.getInstance().addLocation("String_Node_Str",player.getName() + "String_Node_Str","String_Node_Str",player.getName(),player.getLocation());
}

Fixed version (ground truth):
@Override public void onEntityDeath(EntityDeathEvent event){
  if (!(event.getEntity() instanceof Player))   return;
  Player player=(Player)event.getEntity();
  ACPlayer.getPlayer(player.getName()).setLastLocation(player.getLocation());
}
Program: 93814
Project: 93814
Buggy source:
@Override public void onEntityDamage(EntityDamageEvent event){
  if (event.isCancelled())   return;
  if (!(event.getEntity() instanceof Player))   return;
  Player player=(Player)event.getEntity();
  if (ACHelper.getInstance().isValueSet(Type.FLY,player) && event.getCause().equals(EntityDamageEvent.DamageCause.FALL)) {
    event.setCancelled(true);
    event.setDamage(0);
    return;
  }
 else   if (ACHelper.getInstance().hasGodPowers(player.getName())) {
    if (event.getCause().equals(DamageCause.FIRE) || event.getCause().equals(DamageCause.FIRE_TICK))     player.setFireTicks(0);
    event.setCancelled(true);
    event.setDamage(0);
  }
}

Fixed version (ground truth):
@Override public void onEntityDamage(EntityDamageEvent event){
  if (event.isCancelled())   return;
  if (!(event.getEntity() instanceof Player))   return;
  Player player=(Player)event.getEntity();
  if (ACPlayer.getPlayer(player.getName()).hasPower(Type.FLY) && event.getCause().equals(EntityDamageEvent.DamageCause.FALL)) {
    event.setCancelled(true);
    event.setDamage(0);
    return;
  }
 else   if (ACPlayer.getPlayer(player.getName()).hasPower(Type.GOD)) {
    if (event.getCause().equals(DamageCause.FIRE) || event.getCause().equals(DamageCause.FIRE_TICK))     player.setFireTicks(0);
    event.setCancelled(true);
    event.setDamage(0);
  }
}
Program: 93815
Project: 93815
Buggy source:
@Override public void onPlayerQuit(PlayerQuitEvent event){
  Player p=event.getPlayer();
  if (InvisibleWorker.getInstance().hasInvisiblePowers(p.getName()))   event.setQuitMessage(null);
  if (ACHelper.getInstance().getConfBoolean("String_Node_Str")) {
    AFKWorker.getInstance().removePlayer(p);
  }
  Utils.updatePlayedTime(p.getName());
}

Fixed version (ground truth):
@Override public void onPlayerQuit(PlayerQuitEvent event){
  Player p=event.getPlayer();
  PlayerManager.getInstance().setOffline(ACPlayer.getPlayer(p.getName()));
  if (InvisibleWorker.getInstance().hasInvisiblePowers(p.getName()))   event.setQuitMessage(null);
  if (ACHelper.getInstance().getConfBoolean("String_Node_Str")) {
    AFKWorker.getInstance().removePlayer(p);
  }
}
Program: 93816
Project: 93816
Buggy source:
@Override public void onPlayerInteract(PlayerInteractEvent event){
  Player p=event.getPlayer();
  if (ACHelper.getInstance().getConfBoolean("String_Node_Str")) {
    AFKWorker.getInstance().updateTimeStamp(p);
    if (AFKWorker.getInstance().isAfk(p))     AFKWorker.getInstance().setOnline(p);
  }
  if (ACHelper.getInstance().isValueSet(Type.FROZEN,p)) {
    event.setCancelled(true);
    return;
  }
  String playerName=p.getName();
  ItemStack itemInHand=event.getItem();
  if (itemInHand != null && event.getAction() == Action.LEFT_CLICK_BLOCK && itemInHand.getTypeId() == ACHelper.getInstance().getConfInt("String_Node_Str") && ACHelper.getInstance().isValueSet(Type.SUPER_BREAKER,playerName)) {
    superBreaker(playerName,event.getClickedBlock());
    return;
  }
  if (((event.getAction() == Action.LEFT_CLICK_BLOCK) || (event.getAction() == Action.LEFT_CLICK_AIR))) {
    if ((ACHelper.getInstance().hasThorPowers(playerName)))     p.getWorld().strikeLightning(p.getTargetBlock(null,600).getLocation());
    Float power=null;
    if ((power=ACHelper.getInstance().getVulcainExplosionPower(playerName)) != null)     p.getWorld().createExplosion(p.getTargetBlock(null,600).getLocation(),power,true);
    power=null;
    if ((power=(Float)ACHelper.getInstance().getValue(Type.FIREBALL,playerName)) != null)     ShootFireball.shoot(p,power);
    tpAtSee(p);
  }
}

Fixed version (ground truth):
@Override public void onPlayerInteract(PlayerInteractEvent event){
  Player p=event.getPlayer();
  if (ACHelper.getInstance().getConfBoolean("String_Node_Str")) {
    AFKWorker.getInstance().updateTimeStamp(p);
    if (AFKWorker.getInstance().isAfk(p))     AFKWorker.getInstance().setOnline(p);
  }
  ACPlayer player=ACPlayer.getPlayer(p.getName());
  if (player.hasPower(Type.FROZEN)) {
    event.setCancelled(true);
    return;
  }
  ItemStack itemInHand=event.getItem();
  if (itemInHand != null && event.getAction() == Action.LEFT_CLICK_BLOCK && itemInHand.getTypeId() == ACHelper.getInstance().getConfInt("String_Node_Str") && player.hasPower(Type.SUPER_BREAKER)) {
    superBreaker(player,event.getClickedBlock());
    return;
  }
  if (((event.getAction() == Action.LEFT_CLICK_BLOCK) || (event.getAction() == Action.LEFT_CLICK_AIR))) {
    if (player.hasPower(Type.THOR))     p.getWorld().strikeLightning(p.getTargetBlock(null,600).getLocation());
    Float power=null;
    if ((power=player.getPower(Type.VULCAN).getFloat(0)) != 0)     p.getWorld().createExplosion(p.getTargetBlock(null,600).getLocation(),power,true);
    power=null;
    if ((power=player.getPower(Type.FIREBALL).getFloat(0)) != 0)     ShootFireball.shoot(p,power);
    tpAtSee(player);
  }
}
Program: 93817
Project: 93817
Buggy source:
/** 
 * Super breaker mode
 * @param playerName
 * @param block
 */
private void superBreaker(String playerName,Block block){
  int typeId=block.getTypeId();
switch (typeId) {
case 64:
    if (block.getData() < 8)     dropItem(block,324);
  break;
case 71:
if (block.getData() < 8) dropItem(block,330);
break;
case 55:
dropItem(block,331);
break;
case 63:
case 68:
dropItem(block,323);
break;
case 83:
dropItem(block,338);
break;
case 59:
case 31:
dropItem(block,295);
break;
case 26:
if (block.getData() < 4) dropItem(block,355);
break;
case 75:
dropItem(block,76);
break;
case 93:
case 94:
dropItem(block,356);
break;
default :
dropItem(block,typeId);
break;
}
if (Utils.logBlock != null) Utils.logBlock.queueBlockBreak(playerName,block.getState());
block.setTypeId(0);
}

Fixed version (ground truth):
/** 
 * Super breaker mode
 * @param player
 * @param block
 */
private void superBreaker(ACPlayer player,Block block){
  int typeId=block.getTypeId();
switch (typeId) {
case 64:
    if (block.getData() < 8)     dropItem(block,324);
  break;
case 71:
if (block.getData() < 8) dropItem(block,330);
break;
case 55:
dropItem(block,331);
break;
case 63:
case 68:
dropItem(block,323);
break;
case 83:
dropItem(block,338);
break;
case 59:
case 31:
dropItem(block,295);
break;
case 26:
if (block.getData() < 4) dropItem(block,355);
break;
case 75:
dropItem(block,76);
break;
case 93:
case 94:
dropItem(block,356);
break;
default :
dropItem(block,typeId);
break;
}
if (Utils.logBlock != null) Utils.logBlock.queueBlockBreak(player.getName(),block.getState());
block.setTypeId(0);
}
Program: 93818
Project: 93818
Buggy source:
@Override public void onPlayerJoin(PlayerJoinEvent event){
  Player p=event.getPlayer();
  Utils.sParsedLocale(p,"String_Node_Str");
  Utils.sParsedLocale(p,"String_Node_Str");
  if (playerRespawnOrJoin(event.getPlayer())) {
    event.setJoinMessage(null);
    Utils.sI18n(event.getPlayer(),"String_Node_Str");
  }
  if (ACPluginManager.getDataManager().getPlayerInformation(p.getName(),"String_Node_Str").getBoolean(true)) {
    ACPluginManager.getDataManager().setPlayerInformation(p.getName(),"String_Node_Str",false);
    if (ACHelper.getInstance().getConfBoolean("String_Node_Str"))     ACHelper.getInstance().spawn(p);
  }
  ACPluginManager.getDataManager().setPlayerInformation(p.getName(),"String_Node_Str",System.currentTimeMillis());
  if (ACHelper.getInstance().getConfBoolean("String_Node_Str") && !ACHelper.getInstance().isValueSet(Type.TP_REQUEST,p.getName()) && PermissionManager.hasPerm(p,"String_Node_Str"))   ACHelper.getInstance().addValue(Type.TP_REQUEST,p.getName());
}

Fixed version (ground truth):
@Override public void onPlayerJoin(PlayerJoinEvent event){
  Player p=event.getPlayer();
  Utils.sParsedLocale(p,"String_Node_Str");
  Utils.sParsedLocale(p,"String_Node_Str");
  PlayerManager.getInstance().setOnline(p.getName());
  if (playerRespawnOrJoin(event.getPlayer())) {
    event.setJoinMessage(null);
    Utils.sI18n(event.getPlayer(),"String_Node_Str");
  }
  ACPlayer player=ACPlayer.getPlayer(p.getName());
  if (player.getInformation("String_Node_Str").getBoolean(true)) {
    player.setInformation("String_Node_Str",false);
    if (ACHelper.getInstance().getConfBoolean("String_Node_Str"))     ACHelper.getInstance().spawn(p);
  }
  player.setInformation("String_Node_Str",System.currentTimeMillis());
  if (ACHelper.getInstance().getConfBoolean("String_Node_Str") && !player.hasPower(Type.TP_REQUEST) && PermissionManager.hasPerm(p,"String_Node_Str"))   player.setPower(Type.TP_REQUEST);
}
Program: 93819
Project: 93819
Buggy source:
private boolean playerRespawnOrJoin(Player newPlayer){
  ACPluginManager.getServer().getScheduler().scheduleSyncDelayedTask(ACHelper.getInstance().getCoreInstance(),new UpdateInvisibleOnJoin(newPlayer),5);
  if (InvisibleWorker.getInstance().hasInvisiblePowers(newPlayer.getName())) {
    ACPluginManager.getServer().getScheduler().scheduleSyncDelayedTask(ACHelper.getInstance().getCoreInstance(),new UpdateInvisible(newPlayer),5);
    return true;
  }
  return false;
}

Fixed version (ground truth):
private boolean playerRespawnOrJoin(Player newPlayer){
  ACPluginManager.getServer().getScheduler().scheduleSyncDelayedTask(ACHelper.getInstance().getCoreInstance(),new UpdateInvisibleOnJoin(newPlayer),15);
  if (InvisibleWorker.getInstance().hasInvisiblePowers(newPlayer.getName())) {
    ACPluginManager.getServer().getScheduler().scheduleSyncDelayedTask(ACHelper.getInstance().getCoreInstance(),new UpdateInvisible(newPlayer),15);
    return true;
  }
  return false;
}
Program: 93820
Project: 93820
Buggy source:
@Override public void onPlayerTeleport(PlayerTeleportEvent event){
  if (event.isCancelled())   return;
  Location from=event.getFrom();
  Location to=event.getTo();
  String playername=event.getPlayer().getName();
  boolean otherWorld=!from.getWorld().equals(to.getWorld());
  if (otherWorld) {
    ACHelper.getInstance().addLocation("String_Node_Str",playername + "String_Node_Str","String_Node_Str",playername,from);
  }
  if (ACHelper.getInstance().isValueSet(Type.FROZEN,playername)) {
    event.setCancelled(true);
    return;
  }
  if (ACHelper.getInstance().getConfBoolean("String_Node_Str") && !otherWorld && !PermissionManager.hasPerm(event.getPlayer(),"String_Node_Str",false)) {
    if (ACHelper.getInstance().removeKeyFromValues(event.getPlayer()) || InvisibleWorker.getInstance().hasInvisiblePowers(playername)) {
      InvisibleWorker.getInstance().reappear(event.getPlayer());
      Utils.sI18n(event.getPlayer(),"String_Node_Str");
    }
  }
 else   playerRespawnOrJoin(event.getPlayer());
}

Fixed version (ground truth):
@Override public void onPlayerTeleport(PlayerTeleportEvent event){
  if (event.isCancelled())   return;
  Location from=event.getFrom();
  Location to=event.getTo();
  String playername=event.getPlayer().getName();
  boolean otherWorld=!from.getWorld().equals(to.getWorld());
  ACPlayer player=ACPlayer.getPlayer(playername);
  if (otherWorld) {
    player.setLastLocation(from);
  }
  if (player.hasPower(Type.FROZEN)) {
    event.setCancelled(true);
    return;
  }
  if (ACHelper.getInstance().getConfBoolean("String_Node_Str") && !otherWorld && !PermissionManager.hasPerm(event.getPlayer(),"String_Node_Str",false)) {
    player.removeAllSuperPower();
    if (InvisibleWorker.getInstance().hasInvisiblePowers(playername)) {
      InvisibleWorker.getInstance().reappear(event.getPlayer());
      Utils.sI18n(event.getPlayer(),"String_Node_Str");
    }
  }
  playerRespawnOrJoin(event.getPlayer());
}
Program: 93821
Project: 93821
Buggy source:
@Override public void onPlayerMove(PlayerMoveEvent event){
  Player p=event.getPlayer();
  if (ACHelper.getInstance().getConfBoolean("String_Node_Str")) {
    AFKWorker.getInstance().updateTimeStamp(p);
    if (AFKWorker.getInstance().isAfk(p))     AFKWorker.getInstance().setOnline(p);
  }
  if (ACHelper.getInstance().isValueSet(Type.FROZEN,p)) {
    ((CraftPlayer)p).getHandle().netServerHandler.teleport(event.getFrom());
    return;
  }
  Float power=(Float)ACHelper.getInstance().getValue(Type.FLY,p.getName());
  if (power != null)   if (p.isSneaking())   p.setVelocity(p.getLocation().getDirection().multiply(power));
 else   if (ACHelper.getInstance().getConfBoolean("String_Node_Str")) {
    Vector vel=p.getVelocity();
    vel.add(p.getLocation().getDirection().multiply(ACHelper.getInstance().getConfFloat("String_Node_Str")).setY(0));
    if (vel.getY() < ACHelper.getInstance().getConfFloat("String_Node_Str")) {
      vel.setY(ACHelper.getInstance().getConfFloat("String_Node_Str"));
      p.setVelocity(vel);
    }
  }
}

Fixed version (ground truth):
@Override public void onPlayerMove(PlayerMoveEvent event){
  Player p=event.getPlayer();
  if (ACHelper.getInstance().getConfBoolean("String_Node_Str")) {
    AFKWorker.getInstance().updateTimeStamp(p);
    if (AFKWorker.getInstance().isAfk(p))     AFKWorker.getInstance().setOnline(p);
  }
  ACPlayer player=ACPlayer.getPlayer(p.getName());
  if (player.hasPower(Type.FROZEN)) {
    ((CraftPlayer)p).getHandle().netServerHandler.teleport(event.getFrom());
    return;
  }
  Float power=player.getPower(Type.FLY).getFloat(0);
  if (power != 0)   if (p.isSneaking())   p.setVelocity(p.getLocation().getDirection().multiply(power));
 else   if (ACHelper.getInstance().getConfBoolean("String_Node_Str")) {
    Vector vel=p.getVelocity();
    vel.add(p.getLocation().getDirection().multiply(ACHelper.getInstance().getConfFloat("String_Node_Str")).setY(0));
    if (vel.getY() < ACHelper.getInstance().getConfFloat("String_Node_Str")) {
      vel.setY(ACHelper.getInstance().getConfFloat("String_Node_Str"));
      p.setVelocity(vel);
    }
  }
}
Program: 93822
Project: 93822
Buggy source:
@Override public void onPlayerChat(PlayerChatEvent event){
  Player p=event.getPlayer();
  if (ACHelper.getInstance().getConfBoolean("String_Node_Str")) {
    AFKWorker.getInstance().updateTimeStamp(p);
    if (AFKWorker.getInstance().isAfk(p))     AFKWorker.getInstance().setOnline(p);
  }
  if (ACHelper.getInstance().isValueSet(Type.MUTED,p)) {
    event.setCancelled(true);
    Utils.sI18n(p,"String_Node_Str");
  }
}

Fixed version (ground truth):
@Override public void onPlayerChat(PlayerChatEvent event){
  Player p=event.getPlayer();
  ACPlayer player=ACPlayer.getPlayer(p.getName());
  if (ACHelper.getInstance().getConfBoolean("String_Node_Str")) {
    AFKWorker.getInstance().updateTimeStamp(p);
    if (AFKWorker.getInstance().isAfk(p))     AFKWorker.getInstance().setOnline(p);
  }
  if (player.hasPower(Type.MUTED)) {
    event.setCancelled(true);
    Utils.sI18n(p,"String_Node_Str");
  }
}
Program: 93823
Project: 93823
Buggy source:
@Override public void onPlayerLogin(PlayerLoginEvent event){
  if (ACHelper.getInstance().isValueSet(Type.BANNED,event.getPlayer().getName())) {
    event.disallow(Result.KICK_BANNED,ACHelper.getInstance().getValue(Type.BANNED,event.getPlayer().getName()).toString());
    return;
  }
  if (PermissionManager.hasPerm(event.getPlayer(),"String_Node_Str",false))   event.allow();
}

Fixed version (ground truth):
@Override public void onPlayerLogin(PlayerLoginEvent event){
  ACPlayer player=ACPlayer.getPlayer(event.getPlayer().getName());
  if (player.hasPower(Type.BANNED)) {
    event.disallow(Result.KICK_BANNED,player.getPower(Type.BANNED).getString());
    return;
  }
  if (PermissionManager.hasPerm(event.getPlayer(),"String_Node_Str",false))   event.allow();
}
Program: 93824
Project: 93824
Buggy source:
@Override public void onPlayerPickupItem(PlayerPickupItemEvent event){
  if (event.isCancelled())   return;
  if (ACHelper.getInstance().isValueSet(Type.NO_PICKUP,event.getPlayer()))   event.setCancelled(true);
}

Fixed version (ground truth):
@Override public void onPlayerPickupItem(PlayerPickupItemEvent event){
  if (event.isCancelled())   return;
  ACPlayer player=ACPlayer.getPlayer(event.getPlayer().getName());
  if (player.hasPower(Type.NO_PICKUP))   event.setCancelled(true);
}
Program: 93825
Project: 93825
Buggy source:
/** 
 * Tp at see mode
 * @param p
 */
private void tpAtSee(Player p){
  if (ACHelper.getInstance().isValueSet(Type.TP_AT_SEE,p))   try {
    String playername=p.getName();
    Block toTp=p.getWorld().getBlockAt(p.getTargetBlock(null,ACHelper.getInstance().getConfInt("String_Node_Str")).getLocation().add(0,1,0));
    if (toTp.getTypeId() == 0) {
      Location loc=toTp.getLocation().clone();
      loc.setPitch(p.getLocation().getPitch());
      loc.setYaw(p.getLocation().getYaw());
      ACHelper.getInstance().addLocation("String_Node_Str",playername + "String_Node_Str","String_Node_Str",playername,p.getLocation());
      p.teleport(loc);
    }
  }
 catch (  Exception e) {
  }
}

Fixed version (ground truth):
/** 
 * Tp at see mode
 * @param p
 */
private void tpAtSee(ACPlayer player){
  if (player.hasPower(Type.TP_AT_SEE))   try {
    Player p=player.getHandler();
    String playername=p.getName();
    Block toTp=p.getWorld().getBlockAt(p.getTargetBlock(null,ACHelper.getInstance().getConfInt("String_Node_Str")).getLocation().add(0,1,0));
    if (toTp.getTypeId() == 0) {
      Location loc=toTp.getLocation().clone();
      loc.setPitch(p.getLocation().getPitch());
      loc.setYaw(p.getLocation().getYaw());
      ACHelper.getInstance().addLocation("String_Node_Str",playername + "String_Node_Str","String_Node_Str",playername,p.getLocation());
      p.teleport(loc);
    }
  }
 catch (  Exception e) {
  }
}
Program: 93826
Project: 93826
Buggy source:
@Override public void execute(CommandSender sender,String... args){
  if (Utils.isPlayer(sender)) {
    Player p=(Player)sender;
    ACHelper.getInstance().getHomeList(p.getName()).remove(args[0]);
    ACHelper.getInstance().removeLocation("String_Node_Str",p.getName() + "String_Node_Str" + args[0],"String_Node_Str" + args[0],p.getName());
    Utils.sI18n(sender,"String_Node_Str","String_Node_Str",args[0]);
  }
}

Fixed version (ground truth):
@Override public void execute(CommandSender sender,String... args){
  if (Utils.isPlayer(sender)) {
    Player p=(Player)sender;
    ACPlayer.getPlayer(p.getName()).removeHome(args[0]);
    Utils.sI18n(sender,"String_Node_Str","String_Node_Str",args[0]);
  }
}
Program: 93827
Project: 93827
Buggy source:
@Override public void execute(CommandSender sender,String... args){
  if (Utils.isPlayer(sender)) {
    Player player=(Player)sender;
    String home=player.getWorld().getName();
    if (args.length >= 1)     home=args[0];
    Location loc=ACHelper.getInstance().getLocation("String_Node_Str",player.getName() + "String_Node_Str" + home,"String_Node_Str" + home,player.getName());
    if (loc == null)     Utils.sI18n(sender,"String_Node_Str","String_Node_Str",home);
 else {
      player.teleport(loc);
      Utils.sI18n(sender,"String_Node_Str","String_Node_Str",home);
    }
  }
}

Fixed version (ground truth):
@Override public void execute(CommandSender sender,String... args){
  if (Utils.isPlayer(sender)) {
    Player player=(Player)sender;
    String home=player.getWorld().getName();
    if (args.length >= 1)     home=args[0];
    Location loc=ACPlayer.getPlayer(player.getName()).getHome(home);
    if (loc == null)     Utils.sI18n(sender,"String_Node_Str","String_Node_Str",home);
 else {
      player.teleport(loc);
      Utils.sI18n(sender,"String_Node_Str","String_Node_Str",home);
    }
  }
}
Program: 93828
Project: 93828
Buggy source:
@Override public void execute(CommandSender sender,String... args){
  if (Utils.isPlayer(sender)) {
    String msg="String_Node_Str";
    Set<String> homes=ACHelper.getInstance().getHomeList(((Player)sender).getName());
    sender.sendMessage(ChatColor.GOLD + "String_Node_Str" + ChatColor.WHITE+ homes.size());
    for (    String name : homes) {
      msg+=name + "String_Node_Str";
      if (msg.length() >= 256) {
        sender.sendMessage(msg);
        msg="String_Node_Str";
      }
    }
    if (!msg.equals("String_Node_Str")) {
      if (msg.endsWith("String_Node_Str"))       msg=msg.substring(0,msg.lastIndexOf("String_Node_Str"));
      sender.sendMessage(msg);
    }
  }
}

Fixed version (ground truth):
@Override public void execute(CommandSender sender,String... args){
  if (Utils.isPlayer(sender)) {
    String msg="String_Node_Str";
    List<String> homes=ACPlayer.getPlayer(((Player)sender).getName()).getHomeList();
    sender.sendMessage(ChatColor.GOLD + "String_Node_Str" + ChatColor.WHITE+ homes.size());
    for (    String name : homes) {
      msg+=name + "String_Node_Str";
      if (msg.length() >= 256) {
        sender.sendMessage(msg);
        msg="String_Node_Str";
      }
    }
    if (!msg.equals("String_Node_Str")) {
      if (msg.endsWith("String_Node_Str"))       msg=msg.substring(0,msg.lastIndexOf("String_Node_Str"));
      sender.sendMessage(msg);
    }
  }
}