nus-yam/ex-repair huggingface dataset:
Program: 134095
Project: 134095
Buggy source:
public AirCombo(Player player,String ability){
  if (!enabled)   return;
  if (!GeneralMethods.getBendingPlayer(player.getName()).hasElement(Element.Air))   return;
  if (Commands.isToggledForAll)   return;
  if (GeneralMethods.isRegionProtectedFromBuild(player,"String_Node_Str",player.getLocation()))   return;
  if (!GeneralMethods.getBendingPlayer(player.getName()).isToggled())   return;
  time=System.currentTimeMillis();
  this.player=player;
  this.ability=ability;
  this.bplayer=GeneralMethods.getBendingPlayer(player.getName());
  if (ChiMethods.isChiBlocked(player.getName()) || Bloodbending.isBloodbended(player) || Paralyze.isParalyzed(player)) {
    return;
  }
  if (ability.equalsIgnoreCase("String_Node_Str")) {
    damage=0;
    range=TWISTER_RANGE;
    speed=TWISTER_SPEED;
    cooldown=TWISTER_COOLDOWN;
  }
 else   if (ability.equalsIgnoreCase("String_Node_Str")) {
    damage=0;
    range=AIR_STREAM_RANGE;
    speed=AIR_STREAM_SPEED;
    cooldown=AIR_STREAM_COOLDOWN;
  }
 else   if (ability.equalsIgnoreCase("String_Node_Str")) {
    damage=AIR_SLICE_DAMAGE;
    range=AIR_SLICE_RANGE;
    speed=AIR_SLICE_SPEED;
    cooldown=AIR_SLICE_COOLDOWN;
  }
 else   if (ability.equalsIgnoreCase("String_Node_Str")) {
    damage=AIR_SWEEP_DAMAGE;
    range=AIR_SWEEP_RANGE;
    speed=AIR_SWEEP_SPEED;
    knockback=AIR_SWEEP_KNOCKBACK;
    cooldown=AIR_SWEEP_COOLDOWN;
  }
  if (AvatarState.isAvatarState(player)) {
    cooldown=0;
    damage=AvatarState.getValue(damage);
    range=AvatarState.getValue(range);
    knockback=knockback * 1.4;
  }
  instances.add(this);
}

Fixed version (ground truth):
public AirCombo(Player player,String ability){
  if (!enabled)   return;
  if (!GeneralMethods.getBendingPlayer(player.getName()).hasElement(Element.Air))   return;
  if (Commands.isToggledForAll)   return;
  if (GeneralMethods.isRegionProtectedFromBuild(player,"String_Node_Str",player.getLocation()))   return;
  if (!GeneralMethods.getBendingPlayer(player.getName()).isToggled())   return;
  time=System.currentTimeMillis();
  this.player=player;
  this.ability=ability;
  this.bplayer=GeneralMethods.getBendingPlayer(player.getName());
  if (GeneralMethods.canBend(player.getDisplayName(),ability)) {
    return;
  }
  if (ability.equalsIgnoreCase("String_Node_Str")) {
    damage=0;
    range=TWISTER_RANGE;
    speed=TWISTER_SPEED;
    cooldown=TWISTER_COOLDOWN;
  }
 else   if (ability.equalsIgnoreCase("String_Node_Str")) {
    damage=0;
    range=AIR_STREAM_RANGE;
    speed=AIR_STREAM_SPEED;
    cooldown=AIR_STREAM_COOLDOWN;
  }
 else   if (ability.equalsIgnoreCase("String_Node_Str")) {
    damage=AIR_SLICE_DAMAGE;
    range=AIR_SLICE_RANGE;
    speed=AIR_SLICE_SPEED;
    cooldown=AIR_SLICE_COOLDOWN;
  }
 else   if (ability.equalsIgnoreCase("String_Node_Str")) {
    damage=AIR_SWEEP_DAMAGE;
    range=AIR_SWEEP_RANGE;
    speed=AIR_SWEEP_SPEED;
    knockback=AIR_SWEEP_KNOCKBACK;
    cooldown=AIR_SWEEP_COOLDOWN;
  }
  if (AvatarState.isAvatarState(player)) {
    cooldown=0;
    damage=AvatarState.getValue(damage);
    range=AvatarState.getValue(range);
    knockback=knockback * 1.4;
  }
  instances.add(this);
}
Program: 134096
Project: 134096
Buggy source:
public static boolean checkForValidCombo(Player player){
  List<ChiCombo> combo=instances.get(player);
  for (  List<ChiCombo> knownCombo : knownCombos) {
    int size=knownCombo.size();
    if (combo.size() < size)     continue;
    boolean isValid=true;
    for (int i=1; i <= size; i++) {
      if (combo.get(combo.size() - i) != (knownCombo.get(knownCombo.size() - i))) {
        isValid=false;
        break;
      }
    }
    if (isValid) {
      if (combo.size() == 4 && combo.get(0) == ChiCombo.QuickStrike && combo.get(1) == ChiCombo.SwiftKick && combo.get(2) == ChiCombo.QuickStrike && combo.get(3) == ChiCombo.QuickStrike) {
        if (!GeneralMethods.getBendingPlayer(player.getName()).isOnCooldown("String_Node_Str")) {
          GeneralMethods.getBendingPlayer(player.getName()).addCooldown("String_Node_Str",cooldown);
          paralyzeTarget(player,paralysisDuration);
        }
      }
      instances.remove(player);
      return true;
    }
  }
  return false;
}

Fixed version (ground truth):
public static boolean checkForValidCombo(Player player){
  List<ChiCombo> combo=instances.get(player);
  for (  List<ChiCombo> knownCombo : knownCombos) {
    int size=knownCombo.size();
    if (combo.size() < size)     continue;
    boolean isValid=true;
    for (int i=1; i <= size; i++) {
      if (combo.get(combo.size() - i) != (knownCombo.get(knownCombo.size() - i))) {
        isValid=false;
        break;
      }
    }
    if (isValid) {
      if (combo.size() == 4 && combo.get(0) == ChiCombo.QuickStrike && combo.get(1) == ChiCombo.SwiftKick && combo.get(2) == ChiCombo.QuickStrike && combo.get(3) == ChiCombo.QuickStrike) {
        if (!GeneralMethods.getBendingPlayer(player.getName()).isOnCooldown("String_Node_Str") && GeneralMethods.canBend(player.getDisplayName(),"String_Node_Str")) {
          GeneralMethods.getBendingPlayer(player.getName()).addCooldown("String_Node_Str",cooldown);
          paralyzeTarget(player,paralysisDuration);
        }
      }
      instances.remove(player);
      return true;
    }
  }
  return false;
}
Program: 134098
Project: 134098
Buggy source:
public ConfigManager(ProjectKorra plugin){
  ConfigManager.plugin=plugin;
  deathMsgConfig=new Config(new File("String_Node_Str"));
  configCheck(ConfigType.DEFAULT);
  configCheck(ConfigType.DEATH_MESSAGE);
}

Fixed version (ground truth):
public ConfigManager(ProjectKorra plugin){
  ConfigManager.plugin=plugin;
  deathMsgConfig=new Config(new File("String_Node_Str"));
  defaultConfig=new Config(new File("String_Node_Str"));
  configCheck(ConfigType.DEFAULT);
  configCheck(ConfigType.DEATH_MESSAGE);
}
Program: 134103
Project: 134103
Buggy source:
public static boolean isObstructed(Location location1,Location location2){
  Vector loc1=location1.toVector();
  Vector loc2=location2.toVector();
  Vector direction=loc2.subtract(loc1);
  direction.normalize();
  Location loc;
  double max=location1.distance(location2);
  for (double i=0; i <= max; i++) {
    loc=location1.clone().add(direction.clone().multiply(i));
    Material type=loc.getBlock().getType();
    if (type != Material.AIR && !Arrays.asList(EarthMethods.getTransparentEarthbending()).contains(type.getId()))     return true;
  }
  return false;
}

Fixed version (ground truth):
public static boolean isObstructed(Location location1,Location location2){
  Vector loc1=location1.toVector();
  Vector loc2=location2.toVector();
  Vector direction=loc2.subtract(loc1);
  direction.normalize();
  Location loc;
  double max=location1.distance(location2);
  for (double i=0; i <= max; i++) {
    loc=location1.clone().add(direction.clone().multiply(i));
    Material type=loc.getBlock().getType();
    if (type != Material.AIR && !(Arrays.asList(EarthMethods.getTransparentEarthbending()).contains(type.getId()) || WaterMethods.isWater(loc.getBlock())))     return true;
  }
  return false;
}
Program: 134104
Project: 134104
Buggy source:
public static boolean removeAroundPoint(Player player,String ability,Location loc,double radius){
  boolean removed=false;
  for (int i=0; i < instances.size(); i++) {
    FireCombo combo=instances.get(i);
    if (combo.getPlayer().equals(player))     continue;
    if (ability.equalsIgnoreCase("String_Node_Str") && combo.ability.equalsIgnoreCase("String_Node_Str")) {
      for (      FireComboStream fs : combo.tasks) {
        if (fs.getLocation() != null && fs.getLocation().getWorld() == loc.getWorld() && Math.abs(fs.getLocation().distance(loc)) <= radius) {
          fs.remove();
          removed=true;
        }
      }
    }
 else     if (ability.equalsIgnoreCase("String_Node_Str") && combo.ability.equalsIgnoreCase("String_Node_Str")) {
      for (      FireComboStream fs : combo.tasks) {
        if (fs.getLocation() != null && Math.abs(fs.getLocation().distance(loc)) <= radius) {
          fs.remove();
          removed=true;
        }
      }
    }
 else     if (ability.equalsIgnoreCase("String_Node_Str") && combo.ability.equalsIgnoreCase("String_Node_Str")) {
      if (combo.currentLoc != null && Math.abs(combo.currentLoc.distance(loc)) <= radius) {
        instances.remove(combo);
        removed=true;
      }
    }
  }
  return removed;
}

Fixed version (ground truth):
public static boolean removeAroundPoint(Player player,String ability,Location loc,double radius){
  boolean removed=false;
  for (int i=0; i < instances.size(); i++) {
    FireCombo combo=instances.get(i);
    if (combo.getPlayer().equals(player))     continue;
    if (ability.equalsIgnoreCase("String_Node_Str") && combo.ability.equalsIgnoreCase("String_Node_Str")) {
      for (      FireComboStream fs : combo.tasks) {
        if (fs.getLocation() != null && fs.getLocation().getWorld() == loc.getWorld() && Math.abs(fs.getLocation().distance(loc)) <= radius) {
          fs.remove();
          removed=true;
        }
      }
    }
 else     if (ability.equalsIgnoreCase("String_Node_Str") && combo.ability.equalsIgnoreCase("String_Node_Str")) {
      for (      FireComboStream fs : combo.tasks) {
        if (fs.getLocation() != null && fs.getLocation().getWorld().equals(loc.getWorld())) {
          if (Math.abs(fs.getLocation().distance(loc)) <= radius) {
            fs.remove();
            removed=true;
          }
        }
      }
    }
 else     if (ability.equalsIgnoreCase("String_Node_Str") && combo.ability.equalsIgnoreCase("String_Node_Str")) {
      if (combo.currentLoc != null && Math.abs(combo.currentLoc.distance(loc)) <= radius) {
        instances.remove(combo);
        removed=true;
      }
    }
  }
  return removed;
}
Program: 134106
Project: 134106
Buggy source:
public static boolean removeSwipesAroundPoint(Location loc,double radius){
  boolean removed=false;
  for (  int ID : instances.keySet()) {
    AirSwipe aswipe=instances.get(ID);
    for (    Vector vec : aswipe.elements.keySet()) {
      Location vectorLoc=aswipe.elements.get(vec);
      if (vectorLoc != null && !vectorLoc.getWorld().equals(loc.getWorld())) {
        if (vectorLoc.distance(loc) <= radius) {
          instances.remove(aswipe.id);
          removed=true;
        }
      }
    }
  }
  return removed;
}

Fixed version (ground truth):
public static boolean removeSwipesAroundPoint(Location loc,double radius){
  boolean removed=false;
  for (  int ID : instances.keySet()) {
    AirSwipe aswipe=instances.get(ID);
    for (    Vector vec : aswipe.elements.keySet()) {
      Location vectorLoc=aswipe.elements.get(vec);
      if (vectorLoc != null && vectorLoc.getWorld().equals(loc.getWorld())) {
        if (vectorLoc.distance(loc) <= radius) {
          instances.remove(aswipe.id);
          removed=true;
        }
      }
    }
  }
  return removed;
}
Program: 134107
Project: 134107
Buggy source:
public void revert(){
  if (player == null) {
    instances.remove(player);
    return;
  }
  player.setAllowFlight(couldFly);
  player.setFlying(wasFlying);
}

Fixed version (ground truth):
public void revert(){
  if (player == null) {
    return;
  }
  player.setAllowFlight(couldFly);
  player.setFlying(wasFlying);
}
Program: 134109
Project: 134109
Buggy source:
public static boolean removeSwipesAroundPoint(Location loc,double radius){
  boolean removed=false;
  for (  int ID : instances.keySet()) {
    AirSwipe aswipe=instances.get(ID);
    for (    Vector vec : aswipe.elements.keySet()) {
      Location vectorLoc=aswipe.elements.get(vec);
      if (vectorLoc != null && !vectorLoc.getWorld().equals(loc.getWorld())) {
        if (vectorLoc.distance(loc) <= radius) {
          instances.remove(aswipe.id);
          removed=true;
        }
      }
    }
  }
  return removed;
}

Fixed version (ground truth):
public static boolean removeSwipesAroundPoint(Location loc,double radius){
  boolean removed=false;
  for (  int ID : instances.keySet()) {
    AirSwipe aswipe=instances.get(ID);
    for (    Vector vec : aswipe.elements.keySet()) {
      Location vectorLoc=aswipe.elements.get(vec);
      if (vectorLoc != null && vectorLoc.getWorld().equals(loc.getWorld())) {
        if (vectorLoc.distance(loc) <= radius) {
          instances.remove(aswipe.id);
          removed=true;
        }
      }
    }
  }
  return removed;
}
Program: 134110
Project: 134110
Buggy source:
/** 
 * Damages an Entity by amount of damage specified. Starts a   {@link EntityDamageByEntityEvent}.
 * @param player The player dealing the damage
 * @param entity The entity that is receiving the damage
 * @param damage The amount of damage to deal
 * @param ability The ability that is used to damage the entity
 */
public static void damageEntity(Player player,Entity entity,double damage,String ability){
  if (entity instanceof LivingEntity) {
    if (entity instanceof Player) {
      if (Commands.invincible.contains(((Player)entity).getName()))       return;
    }
    if (Bukkit.getPluginManager().isPluginEnabled("String_Node_Str")) {
      NCPExemptionManager.exemptPermanently(player,CheckType.FIGHT_REACH);
    }
    if (((LivingEntity)entity).getHealth() - damage <= 0 && entity instanceof Player && !entity.isDead()) {
      if (ability == null) {
        ability=getLastUsedAbility(player,true);
      }
      if (ability != null && !ability.isEmpty()) {
        PlayerBendingDeathEvent event=new PlayerBendingDeathEvent((Player)entity,player,ability,damage);
        Bukkit.getServer().getPluginManager().callEvent(event);
      }
    }
    ((LivingEntity)entity).damage(damage,player);
    ((LivingEntity)entity).setLastDamageCause(new EntityDamageByEntityEvent(player,entity,DamageCause.CUSTOM,damage));
    if (Bukkit.getPluginManager().isPluginEnabled("String_Node_Str")) {
      NCPExemptionManager.unexempt(player);
    }
  }
}

Fixed version (ground truth):
/** 
 * Damages an Entity by amount of damage specified. Starts a   {@link EntityDamageByEntityEvent}.
 * @param player The player dealing the damage
 * @param entity The entity that is receiving the damage
 * @param damage The amount of damage to deal
 * @param ability The ability that is used to damage the entity
 */
public static void damageEntity(Player player,Entity entity,double damage,String ability){
  if (entity instanceof LivingEntity) {
    if (entity instanceof Player) {
      if (Commands.invincible.contains(((Player)entity).getName()))       return;
    }
    if (Bukkit.getPluginManager().isPluginEnabled("String_Node_Str")) {
      NCPExemptionManager.exemptPermanently(player,CheckType.FIGHT_REACH);
    }
    if (((LivingEntity)entity).getHealth() - damage <= 0 && entity instanceof Player && !entity.isDead()) {
      PlayerBendingDeathEvent event=new PlayerBendingDeathEvent((Player)entity,player,ability,damage);
      Bukkit.getServer().getPluginManager().callEvent(event);
    }
    ((LivingEntity)entity).damage(damage,player);
    ((LivingEntity)entity).setLastDamageCause(new EntityDamageByEntityEvent(player,entity,DamageCause.CUSTOM,damage));
    if (Bukkit.getPluginManager().isPluginEnabled("String_Node_Str")) {
      NCPExemptionManager.unexempt(player);
    }
  }
}
Program: 134113
Project: 134113
Buggy source:
public static Collection<Player> getPlayersAroundPoint(Location location,double distance){
  Collection<Player> players=new HashSet<Player>();
  for (  Player player : Bukkit.getOnlinePlayers()) {
    if (player.getLocation().distance(location) <= distance) {
      players.add(player);
    }
  }
  return players;
}

Fixed version (ground truth):
public static Collection<Player> getPlayersAroundPoint(Location location,double distance){
  Collection<Player> players=new HashSet<Player>();
  for (  Player player : Bukkit.getOnlinePlayers()) {
    if (player.getLocation().getWorld().equals(location.getWorld())) {
      if (player.getLocation().distance(location) <= distance) {
        players.add(player);
      }
    }
  }
  return players;
}
Program: 134114
Project: 134114
Buggy source:
public static void saveAbility(BendingPlayer bPlayer,int slot,String ability){
  if (bPlayer == null)   return;
  String uuid=bPlayer.uuid.toString();
  if (MultiAbilityManager.playerAbilities.containsKey(Bukkit.getPlayer(bPlayer.getPlayerName())))   return;
  HashMap<Integer,String> abilities=bPlayer.getAbilities();
  DBConnection.sql.modifyQuery("String_Node_Str" + slot + "String_Node_Str"+ (abilities.get(slot) == null ? null : abilities.get(slot))+ "String_Node_Str"+ uuid+ "String_Node_Str");
}

Fixed version (ground truth):
public static void saveAbility(BendingPlayer bPlayer,int slot,String ability){
  if (bPlayer == null)   return;
  String uuid=bPlayer.uuid.toString();
  if (MultiAbilityManager.playerAbilities.containsKey(Bukkit.getPlayer(bPlayer.uuid)))   return;
  HashMap<Integer,String> abilities=bPlayer.getAbilities();
  DBConnection.sql.modifyQuery("String_Node_Str" + slot + "String_Node_Str"+ (abilities.get(slot) == null ? null : abilities.get(slot))+ "String_Node_Str"+ uuid+ "String_Node_Str");
}
Program: 134115
Project: 134115
Buggy source:
public void save(){
  DBConnection.sql.modifyQuery("String_Node_Str" + uuid.toString() + "String_Node_Str"+ name+ "String_Node_Str");
  DBConnection.sql.modifyQuery("String_Node_Str" + abilities.get(1) + "String_Node_Str"+ uuid.toString()+ "String_Node_Str"+ name+ "String_Node_Str");
  DBConnection.sql.modifyQuery("String_Node_Str" + abilities.get(2) + "String_Node_Str"+ uuid.toString()+ "String_Node_Str"+ name+ "String_Node_Str");
  DBConnection.sql.modifyQuery("String_Node_Str" + abilities.get(3) + "String_Node_Str"+ uuid.toString()+ "String_Node_Str"+ name+ "String_Node_Str");
  DBConnection.sql.modifyQuery("String_Node_Str" + abilities.get(4) + "String_Node_Str"+ uuid.toString()+ "String_Node_Str"+ name+ "String_Node_Str");
  DBConnection.sql.modifyQuery("String_Node_Str" + abilities.get(5) + "String_Node_Str"+ uuid.toString()+ "String_Node_Str"+ name+ "String_Node_Str");
  DBConnection.sql.modifyQuery("String_Node_Str" + abilities.get(6) + "String_Node_Str"+ uuid.toString()+ "String_Node_Str"+ name+ "String_Node_Str");
  DBConnection.sql.modifyQuery("String_Node_Str" + abilities.get(7) + "String_Node_Str"+ uuid.toString()+ "String_Node_Str"+ name+ "String_Node_Str");
  DBConnection.sql.modifyQuery("String_Node_Str" + abilities.get(8) + "String_Node_Str"+ uuid.toString()+ "String_Node_Str"+ name+ "String_Node_Str");
  DBConnection.sql.modifyQuery("String_Node_Str" + abilities.get(9) + "String_Node_Str"+ uuid.toString()+ "String_Node_Str"+ name+ "String_Node_Str");
}

Fixed version (ground truth):
public void save(){
  if (ProjectKorra.plugin.getConfig().getString("String_Node_Str").equalsIgnoreCase("String_Node_Str")) {
    DBConnection.sql.modifyQuery("String_Node_Str" + uuid.toString() + "String_Node_Str"+ name+ "String_Node_Str"+ "String_Node_Str");
  }
 else {
    DBConnection.sql.modifyQuery("String_Node_Str" + uuid.toString() + "String_Node_Str"+ name+ "String_Node_Str");
  }
  for (int i=1; i <= 9; i++) {
    DBConnection.sql.modifyQuery("String_Node_Str" + i + "String_Node_Str"+ (abilities.get(i) == null ? null : abilities.get(i))+ "String_Node_Str"+ uuid.toString()+ "String_Node_Str"+ name+ "String_Node_Str");
  }
}
Program: 134116
Project: 134116
Buggy source:
public static boolean removeSwipesAroundPoint(Location loc,double radius){
  boolean removed=false;
  for (  int ID : instances.keySet()) {
    AirSwipe aswipe=instances.get(ID);
    for (    Vector vec : aswipe.elements.keySet()) {
      Location vectorLoc=aswipe.elements.get(vec);
      if (vectorLoc != null && vectorLoc.getWorld() != loc.getWorld() && vectorLoc.distance(loc) <= radius) {
        instances.remove(aswipe.id);
        removed=true;
      }
    }
  }
  return removed;
}

Fixed version (ground truth):
public static boolean removeSwipesAroundPoint(Location loc,double radius){
  boolean removed=false;
  for (  int ID : instances.keySet()) {
    AirSwipe aswipe=instances.get(ID);
    for (    Vector vec : aswipe.elements.keySet()) {
      Location vectorLoc=aswipe.elements.get(vec);
      if (vectorLoc != null && !vectorLoc.getWorld().equals(loc.getWorld())) {
        if (vectorLoc.distance(loc) <= radius) {
          instances.remove(aswipe.id);
          removed=true;
        }
      }
    }
  }
  return removed;
}
Program: 134117
Project: 134117
Buggy source:
private void fly(){
  if (player.isDead() || !player.isOnline()) {
    remove();
    return;
  }
  if (player.getWorld() != location.getWorld()) {
    remove();
    return;
  }
  if (player.getLocation().distance(location) < 3) {
    if (!moving && System.currentTimeMillis() > starttime + 1000)     flying=false;
    return;
  }
  for (  Block block : GeneralMethods.getBlocksAroundPoint(player.getLocation(),1.5)) {
    if ((GeneralMethods.isSolid(block) || block.isLiquid())) {
      flying=false;
      return;
    }
  }
  Vector vector=direction.clone().multiply(push * distance / length);
  vector.setY(player.getVelocity().getY());
  player.setVelocity(vector);
}

Fixed version (ground truth):
private void fly(){
  if (player.isDead() || !player.isOnline()) {
    remove();
    return;
  }
  if (!player.getWorld().equals(location.getWorld())) {
    remove();
    return;
  }
  if (player.getLocation().distance(location) < 3) {
    if (!moving && System.currentTimeMillis() > starttime + 1000)     flying=false;
    return;
  }
  for (  Block block : GeneralMethods.getBlocksAroundPoint(player.getLocation(),1.5)) {
    if ((GeneralMethods.isSolid(block) || block.isLiquid())) {
      flying=false;
      return;
    }
  }
  Vector vector=direction.clone().multiply(push * distance / length);
  vector.setY(player.getVelocity().getY());
  player.setVelocity(vector);
}
Program: 134120
Project: 134120
Buggy source:
@SuppressWarnings("String_Node_Str") private void set(){
  Block standblock=player.getLocation().getBlock().getRelative(BlockFace.DOWN);
  BendingPlayer bp=GeneralMethods.getBendingPlayer(player.getName());
  if (!bp.isTremorsensing()) {
    if (block != null)     revert();
    return;
  }
  if (EarthMethods.isEarthbendable(player,standblock) && block == null) {
    block=standblock;
    player.sendBlockChange(block.getLocation(),89,(byte)1);
    instances.put(player,this);
  }
 else   if (EarthMethods.isEarthbendable(player,standblock) && !block.equals(standblock)) {
    revert();
    block=standblock;
    player.sendBlockChange(block.getLocation(),89,(byte)1);
    instances.put(player,this);
  }
 else   if (block == null) {
    return;
  }
 else   if (player.getWorld() != block.getWorld()) {
    revert();
  }
 else   if (!EarthMethods.isEarthbendable(player,standblock)) {
    revert();
  }
}

Fixed version (ground truth):
@SuppressWarnings("String_Node_Str") private void set(){
  Block standblock=player.getLocation().getBlock().getRelative(BlockFace.DOWN);
  BendingPlayer bp=GeneralMethods.getBendingPlayer(player.getName());
  if (!bp.isTremorsensing()) {
    if (block != null)     revert();
    return;
  }
  if (EarthMethods.isEarthbendable(player,standblock) && block == null) {
    block=standblock;
    player.sendBlockChange(block.getLocation(),89,(byte)1);
    instances.put(player,this);
  }
 else   if (EarthMethods.isEarthbendable(player,standblock) && !block.equals(standblock)) {
    revert();
    block=standblock;
    player.sendBlockChange(block.getLocation(),89,(byte)1);
    instances.put(player,this);
  }
 else   if (block == null) {
    return;
  }
 else   if (!player.getWorld().equals(block.getWorld())) {
    revert();
  }
 else   if (!EarthMethods.isEarthbendable(player,standblock)) {
    revert();
  }
}
Program: 134121
Project: 134121
Buggy source:
public static boolean isWithinShield(Location loc){
  for (  Player player : instances.keySet()) {
    FireShield fshield=instances.get(player);
    Location playerLoc=fshield.player.getLocation();
    if (fshield.shield) {
      if (playerLoc.getWorld() != loc.getWorld())       return false;
      if (playerLoc.distance(loc) <= fshield.radius)       return true;
    }
 else {
      Location tempLoc=playerLoc.clone().add(playerLoc.multiply(fshield.discradius));
      if (tempLoc.getWorld() != loc.getWorld())       return false;
      if (tempLoc.distance(loc) <= fshield.discradius)       return true;
    }
  }
  return false;
}

Fixed version (ground truth):
public static boolean isWithinShield(Location loc){
  for (  Player player : instances.keySet()) {
    FireShield fshield=instances.get(player);
    Location playerLoc=fshield.player.getLocation();
    if (fshield.shield) {
      if (!playerLoc.getWorld().equals(loc.getWorld()))       return false;
      if (playerLoc.distance(loc) <= fshield.radius)       return true;
    }
 else {
      Location tempLoc=playerLoc.clone().add(playerLoc.multiply(fshield.discradius));
      if (!tempLoc.getWorld().equals(loc.getWorld()))       return false;
      if (tempLoc.distance(loc) <= fshield.discradius)       return true;
    }
  }
  return false;
}
Program: 134122
Project: 134122
Buggy source:
@SuppressWarnings("String_Node_Str") private void set(){
  Block standingblock=player.getLocation().getBlock();
  Block standblock=standingblock.getRelative(BlockFace.DOWN);
  if (standblock.getType() == Material.GLOWSTONE) {
    revert();
  }
 else   if ((FireStream.isIgnitable(player,standingblock) && standblock.getType() != Material.LEAVES) && block == null && !blocks.containsKey(standblock)) {
    block=standingblock;
    normaltype=block.getType();
    normaldata=block.getData();
    block.setType(Material.TORCH);
    blocks.put(block,player);
  }
 else   if ((FireStream.isIgnitable(player,standingblock) && standblock.getType() != Material.LEAVES) && !block.equals(standblock) && !blocks.containsKey(standblock)&& GeneralMethods.isSolid(standblock)) {
    revert();
    block=standingblock;
    normaltype=block.getType();
    normaldata=block.getData();
    block.setType(Material.TORCH);
    blocks.put(block,player);
  }
 else   if (block == null) {
    return;
  }
 else   if (player.getWorld() != block.getWorld()) {
    revert();
  }
 else   if (player.getLocation().distance(block.getLocation()) > FireMethods.getFirebendingDayAugment(range,player.getWorld())) {
    revert();
  }
}

Fixed version (ground truth):
@SuppressWarnings("String_Node_Str") private void set(){
  Block standingblock=player.getLocation().getBlock();
  Block standblock=standingblock.getRelative(BlockFace.DOWN);
  if (standblock.getType() == Material.GLOWSTONE) {
    revert();
  }
 else   if ((FireStream.isIgnitable(player,standingblock) && standblock.getType() != Material.LEAVES && standblock.getType() != Material.LEAVES_2) && block == null && !blocks.containsKey(standblock)) {
    block=standingblock;
    normaltype=block.getType();
    normaldata=block.getData();
    block.setType(Material.TORCH);
    blocks.put(block,player);
  }
 else   if ((FireStream.isIgnitable(player,standingblock) && standblock.getType() != Material.LEAVES && standblock.getType() != Material.LEAVES_2) && !block.equals(standblock) && !blocks.containsKey(standblock)&& GeneralMethods.isSolid(standblock)) {
    revert();
    block=standingblock;
    normaltype=block.getType();
    normaldata=block.getData();
    block.setType(Material.TORCH);
    blocks.put(block,player);
  }
 else   if (block == null) {
    return;
  }
 else   if (!player.getWorld().equals(block.getWorld())) {
    revert();
  }
 else   if (player.getLocation().distance(block.getLocation()) > FireMethods.getFirebendingDayAugment(range,player.getWorld())) {
    revert();
  }
}
Program: 134123
Project: 134123
Buggy source:
private void progress(){
  if (!instances.containsKey(player)) {
    return;
  }
  if (player.isDead() || !player.isOnline() || world != player.getWorld()) {
    remove();
    return;
  }
  if (!GeneralMethods.getBendingPlayer(player.getName()).isToggled()) {
    remove();
    return;
  }
  if (!MultiAbilityManager.hasMultiAbilityBound(player,"String_Node_Str")) {
    remove();
    return;
  }
  if (maxPunches == 0 || maxUses == 0 || maxIceBlasts == 0 || (leftArmConsumed && rightArmConsumed)) {
    remove();
    return;
  }
  selectedSlot=player.getInventory().getHeldItemSlot();
  displayRightArm();
  displayLeftArm();
  if (lightningEnabled)   checkIfZapped();
}

Fixed version (ground truth):
private void progress(){
  if (!instances.containsKey(player)) {
    return;
  }
  if (player.isDead() || !player.isOnline() || !world.equals(player.getWorld())) {
    remove();
    return;
  }
  if (!GeneralMethods.getBendingPlayer(player.getName()).isToggled()) {
    remove();
    return;
  }
  if (!MultiAbilityManager.hasMultiAbilityBound(player,"String_Node_Str")) {
    remove();
    return;
  }
  if (maxPunches == 0 || maxUses == 0 || maxIceBlasts == 0 || (leftArmConsumed && rightArmConsumed)) {
    remove();
    return;
  }
  selectedSlot=player.getInventory().getHeldItemSlot();
  displayRightArm();
  displayLeftArm();
  if (lightningEnabled)   checkIfZapped();
}
Program: 134124
Project: 134124
Buggy source:
private void progress(){
  if (!hasEmptyWaterBottle()) {
    remove();
    return;
  }
  if (player.isDead() || !player.isOnline()) {
    remove();
    return;
  }
  if (player.getWorld() != location.getWorld()) {
    remove();
    return;
  }
  if (System.currentTimeMillis() < time + interval)   return;
  time=System.currentTimeMillis();
  Vector direction=GeneralMethods.getDirection(location,player.getEyeLocation()).normalize();
  location=location.clone().add(direction);
  if (location == null || block == null) {
    remove();
    return;
  }
  if (location.getBlock().equals(block.getLocation().getBlock()))   return;
  if (GeneralMethods.isRegionProtectedFromBuild(player,"String_Node_Str",location)) {
    remove();
    return;
  }
  if (location.distance(player.getEyeLocation()) > WaterMethods.waterbendingNightAugment(range,player.getWorld())) {
    remove();
    return;
  }
  if (location.distance(player.getEyeLocation()) <= 1.5) {
    fillBottle();
    return;
  }
  Block newblock=location.getBlock();
  if (EarthMethods.isTransparentToEarthbending(player,newblock) && !newblock.isLiquid()) {
    block.revertBlock();
    block=new TempBlock(newblock,Material.WATER,full);
  }
 else {
    remove();
    return;
  }
}

Fixed version (ground truth):
private void progress(){
  if (!hasEmptyWaterBottle()) {
    remove();
    return;
  }
  if (player.isDead() || !player.isOnline()) {
    remove();
    return;
  }
  if (!player.getWorld().equals(location.getWorld())) {
    remove();
    return;
  }
  if (System.currentTimeMillis() < time + interval)   return;
  time=System.currentTimeMillis();
  Vector direction=GeneralMethods.getDirection(location,player.getEyeLocation()).normalize();
  location=location.clone().add(direction);
  if (location == null || block == null) {
    remove();
    return;
  }
  if (location.getBlock().equals(block.getLocation().getBlock()))   return;
  if (GeneralMethods.isRegionProtectedFromBuild(player,"String_Node_Str",location)) {
    remove();
    return;
  }
  if (location.distance(player.getEyeLocation()) > WaterMethods.waterbendingNightAugment(range,player.getWorld())) {
    remove();
    return;
  }
  if (location.distance(player.getEyeLocation()) <= 1.5) {
    fillBottle();
    return;
  }
  Block newblock=location.getBlock();
  if (EarthMethods.isTransparentToEarthbending(player,newblock) && !newblock.isLiquid()) {
    block.revertBlock();
    block=new TempBlock(newblock,Material.WATER,full);
  }
 else {
    remove();
    return;
  }
}
Program: 134125
Project: 134125
Buggy source:
public void save(){
  DBConnection.sql.modifyQuery("String_Node_Str" + uuid.toString() + "String_Node_Str"+ name+ "String_Node_Str");
  DBConnection.sql.modifyQuery("String_Node_Str" + abilities.get(1) + "String_Node_Str"+ uuid.toString()+ "String_Node_Str"+ name+ "String_Node_Str");
  DBConnection.sql.modifyQuery("String_Node_Str" + abilities.get(2) + "String_Node_Str"+ uuid.toString()+ "String_Node_Str"+ name+ "String_Node_Str");
  DBConnection.sql.modifyQuery("String_Node_Str" + abilities.get(3) + "String_Node_Str"+ uuid.toString()+ "String_Node_Str"+ name+ "String_Node_Str");
  DBConnection.sql.modifyQuery("String_Node_Str" + abilities.get(4) + "String_Node_Str"+ uuid.toString()+ "String_Node_Str"+ name+ "String_Node_Str");
  DBConnection.sql.modifyQuery("String_Node_Str" + abilities.get(5) + "String_Node_Str"+ uuid.toString()+ "String_Node_Str"+ name+ "String_Node_Str");
  DBConnection.sql.modifyQuery("String_Node_Str" + abilities.get(6) + "String_Node_Str"+ uuid.toString()+ "String_Node_Str"+ name+ "String_Node_Str");
  DBConnection.sql.modifyQuery("String_Node_Str" + abilities.get(7) + "String_Node_Str"+ uuid.toString()+ "String_Node_Str"+ name+ "String_Node_Str");
  DBConnection.sql.modifyQuery("String_Node_Str" + abilities.get(8) + "String_Node_Str"+ uuid.toString()+ "String_Node_Str"+ name+ "String_Node_Str");
  DBConnection.sql.modifyQuery("String_Node_Str" + abilities.get(9) + "String_Node_Str"+ uuid.toString()+ "String_Node_Str"+ name+ "String_Node_Str");
}

Fixed version (ground truth):
public void save(){
  DBConnection.sql.modifyQuery("String_Node_Str" + uuid.toString() + "String_Node_Str"+ name+ "String_Node_Str");
  for (int i=1; i <= 9; i++) {
    DBConnection.sql.modifyQuery("String_Node_Str" + i + "String_Node_Str"+ abilities.get(i)+ "String_Node_Str"+ uuid.toString()+ "String_Node_Str"+ name);
  }
}
Program: 134126
Project: 134126
Buggy source:
public void save(){
  DBConnection.sql.modifyQuery("String_Node_Str" + uuid.toString() + "String_Node_Str"+ name+ "String_Node_Str");
  for (int i=1; i <= 9; i++) {
    DBConnection.sql.modifyQuery("String_Node_Str" + i + "String_Node_Str"+ abilities.get(i)+ "String_Node_Str"+ uuid.toString()+ "String_Node_Str"+ name+ "String_Node_Str");
  }
}

Fixed version (ground truth):
public void save(){
  if (ProjectKorra.plugin.getConfig().getString("String_Node_Str").equalsIgnoreCase("String_Node_Str")) {
    DBConnection.sql.modifyQuery("String_Node_Str" + uuid.toString() + "String_Node_Str"+ name+ "String_Node_Str"+ "String_Node_Str");
  }
 else {
    DBConnection.sql.modifyQuery("String_Node_Str" + uuid.toString() + "String_Node_Str"+ name+ "String_Node_Str");
  }
  for (int i=1; i <= 9; i++) {
    DBConnection.sql.modifyQuery("String_Node_Str" + i + "String_Node_Str"+ (abilities.get(i) == null ? null : abilities.get(i))+ "String_Node_Str"+ uuid.toString()+ "String_Node_Str"+ name+ "String_Node_Str");
  }
}
Program: 134127
Project: 134127
Buggy source:
/** 
 * Damages an Entity by amount of damage specified. Starts a   {@link EntityDamageByEntityEvent}.
 * @param player The player dealing the damage
 * @param entity The entity that is receiving the damage
 * @param damage The amount of damage to deal
 * @param ability The ability that is used to damage the entity
 */
public static void damageEntity(Player player,Entity entity,double damage,String ability){
  if (entity instanceof LivingEntity) {
    if (entity instanceof Player) {
      if (Commands.invincible.contains(((Player)entity).getName()))       return;
    }
    if (Bukkit.getPluginManager().isPluginEnabled("String_Node_Str")) {
      NCPExemptionManager.exemptPermanently(player,CheckType.FIGHT_REACH);
    }
    if (((LivingEntity)entity).getHealth() - damage <= 0 && entity instanceof Player && !entity.isDead()) {
      if (ability == null) {
        ability=getLastUsedAbility(player);
      }
      if (ability != null && !ability.isEmpty()) {
        PlayerBendingDeathEvent event=new PlayerBendingDeathEvent((Player)entity,player,ability,damage);
        Bukkit.getServer().getPluginManager().callEvent(event);
      }
    }
    ((LivingEntity)entity).damage(damage,player);
    ((LivingEntity)entity).setLastDamageCause(new EntityDamageByEntityEvent(player,entity,DamageCause.CUSTOM,damage));
    if (Bukkit.getPluginManager().isPluginEnabled("String_Node_Str")) {
      NCPExemptionManager.unexempt(player);
    }
  }
}

Fixed version (ground truth):
/** 
 * Damages an Entity by amount of damage specified. Starts a   {@link EntityDamageByEntityEvent}.
 * @param player The player dealing the damage
 * @param entity The entity that is receiving the damage
 * @param damage The amount of damage to deal
 * @param ability The ability that is used to damage the entity
 */
public static void damageEntity(Player player,Entity entity,double damage,String ability){
  if (entity instanceof LivingEntity) {
    if (entity instanceof Player) {
      if (Commands.invincible.contains(((Player)entity).getName()))       return;
    }
    if (Bukkit.getPluginManager().isPluginEnabled("String_Node_Str")) {
      NCPExemptionManager.exemptPermanently(player,CheckType.FIGHT_REACH);
    }
    if (((LivingEntity)entity).getHealth() - damage <= 0 && entity instanceof Player && !entity.isDead()) {
      if (ability == null) {
        ability=getLastUsedAbility(player,true);
      }
      if (ability != null && !ability.isEmpty()) {
        PlayerBendingDeathEvent event=new PlayerBendingDeathEvent((Player)entity,player,ability,damage);
        Bukkit.getServer().getPluginManager().callEvent(event);
      }
    }
    ((LivingEntity)entity).damage(damage,player);
    ((LivingEntity)entity).setLastDamageCause(new EntityDamageByEntityEvent(player,entity,DamageCause.CUSTOM,damage));
    if (Bukkit.getPluginManager().isPluginEnabled("String_Node_Str")) {
      NCPExemptionManager.unexempt(player);
    }
  }
}
Program: 134128
Project: 134128
Buggy source:
/** 
 * Returns the last ability used by a player. Also checks if a combo was used.
 * @param player
 * @return
 */
public static String getLastUsedAbility(Player player){
  List<AbilityInformation> lastUsedAbility=ComboManager.getRecentlyUsedAbilities(player,1);
  if (!lastUsedAbility.isEmpty()) {
    if (ComboManager.checkForValidCombo(player) != null) {
      return ComboManager.checkForValidCombo(player).getName();
    }
 else {
      return lastUsedAbility.get(0).getAbilityName();
    }
  }
  return null;
}

Fixed version (ground truth):
/** 
 * Returns the last ability used by a player. Also checks if a combo was used.
 * @param player
 * @return
 */
public static String getLastUsedAbility(Player player,boolean checkCombos){
  List<AbilityInformation> lastUsedAbility=ComboManager.getRecentlyUsedAbilities(player,1);
  if (!lastUsedAbility.isEmpty()) {
    if (ComboManager.checkForValidCombo(player) != null && checkCombos) {
      return ComboManager.checkForValidCombo(player).getName();
    }
 else {
      return lastUsedAbility.get(0).getAbilityName();
    }
  }
  return null;
}
Program: 134133
Project: 134133
Buggy source:
public static void removeAll(){
  for (  Player player : instances.keySet()) {
    Flight flight=instances.get(player);
    flight.revert();
    flight.remove();
  }
}

Fixed version (ground truth):
public static void removeAll(){
  for (  Player player : instances.keySet()) {
    Flight flight=instances.get(player);
    if (player == null || flight == null) {
      instances.remove(player);
      continue;
    }
    flight.revert();
    flight.remove();
  }
}
Program: 134134
Project: 134134
Buggy source:
public void revert(){
  player.setAllowFlight(couldFly);
  player.setFlying(wasFlying);
}

Fixed version (ground truth):
public void revert(){
  if (player == null) {
    instances.remove(player);
    return;
  }
  player.setAllowFlight(couldFly);
  player.setFlying(wasFlying);
}
Program: 134135
Project: 134135
Buggy source:
public static boolean isChiBlocked(String player){
  return Methods.getBendingPlayer(player).isChiBlocked();
}

Fixed version (ground truth):
public static boolean isChiBlocked(String player){
  if (Methods.getBendingPlayer(player) != null) {
    return Methods.getBendingPlayer(player).isChiBlocked();
  }
  return false;
}
Program: 134136
Project: 134136
Buggy source:
public static boolean isWithinShield(Location loc){
  for (  int ID : instances.keySet()) {
    AirShield ashield=instances.get(ID);
    if (ashield.player.getLocation().distance(loc) <= ashield.radius)     return true;
  }
  return false;
}

Fixed version (ground truth):
public static boolean isWithinShield(Location loc){
  for (  int ID : instances.keySet()) {
    AirShield ashield=instances.get(ID);
    if (ashield.player.getLocation().getWorld() != loc.getWorld())     return false;
    if (ashield.player.getLocation().distance(loc) <= ashield.radius)     return true;
  }
  return false;
}
Program: 134137
Project: 134137
Buggy source:
public static boolean removeSwipesAroundPoint(Location loc,double radius){
  boolean removed=false;
  for (  int ID : instances.keySet()) {
    AirSwipe aswipe=instances.get(ID);
    for (    Vector vec : aswipe.elements.keySet()) {
      Location vectorLoc=aswipe.elements.get(vec);
      if (vectorLoc != null && vectorLoc.distance(loc) <= radius) {
        instances.remove(aswipe.id);
        removed=true;
      }
    }
  }
  return removed;
}

Fixed version (ground truth):
public static boolean removeSwipesAroundPoint(Location loc,double radius){
  boolean removed=false;
  for (  int ID : instances.keySet()) {
    AirSwipe aswipe=instances.get(ID);
    for (    Vector vec : aswipe.elements.keySet()) {
      Location vectorLoc=aswipe.elements.get(vec);
      if (vectorLoc != null && vectorLoc.getWorld() != loc.getWorld() && vectorLoc.distance(loc) <= radius) {
        instances.remove(aswipe.id);
        removed=true;
      }
    }
  }
  return removed;
}
Program: 134138
Project: 134138
Buggy source:
public void smashToSmashCollisionDetection(){
  for (int i=0; i < instances.size(); i++) {
    EarthSmash smash=instances.get(i);
    if (smash.loc != null) {
      if (smash != this && smash.loc.distanceSquared(loc) < Math.pow(FLIGHT_DETECTION_RADIUS,2)) {
        smash.remove();
        remove();
        i-=2;
        return;
      }
    }
  }
}

Fixed version (ground truth):
public void smashToSmashCollisionDetection(){
  for (int i=0; i < instances.size(); i++) {
    EarthSmash smash=instances.get(i);
    if (smash.loc != null) {
      if (smash != this && smash.loc.getWorld() == loc.getWorld() && smash.loc.distanceSquared(loc) < Math.pow(FLIGHT_DETECTION_RADIUS,2)) {
        smash.remove();
        remove();
        i-=2;
        return;
      }
    }
  }
}
Program: 134139
Project: 134139
Buggy source:
private EarthSmash aimingAtSmashCheck(Player player,State reqState){
  if (!ALLOW_GRAB)   return null;
  @SuppressWarnings("String_Node_Str") List<Block> blocks=player.getLineOfSight(Methods.getTransparentEarthbending(),(int)Math.round(grabRange));
  for (  EarthSmash smash : instances) {
    if (reqState == null || smash.state == reqState)     for (    Block block : blocks)     if (block.getLocation().distanceSquared(smash.loc) <= Math.pow(GRAB_DETECTION_RADIUS,2))     return smash;
  }
  return null;
}

Fixed version (ground truth):
private EarthSmash aimingAtSmashCheck(Player player,State reqState){
  if (!ALLOW_GRAB)   return null;
  @SuppressWarnings("String_Node_Str") List<Block> blocks=player.getLineOfSight(Methods.getTransparentEarthbending(),(int)Math.round(grabRange));
  for (  EarthSmash smash : instances) {
    if (reqState == null || smash.state == reqState)     for (    Block block : blocks)     if (block.getLocation().getWorld() == smash.loc.getWorld() && block.getLocation().distanceSquared(smash.loc) <= Math.pow(GRAB_DETECTION_RADIUS,2))     return smash;
  }
  return null;
}
Program: 134140
Project: 134140
Buggy source:
public static boolean removeAroundPoint(Player player,String ability,Location loc,double radius){
  boolean removed=false;
  for (int i=0; i < instances.size(); i++) {
    FireCombo combo=instances.get(i);
    if (combo.getPlayer().equals(player))     continue;
    if (ability.equalsIgnoreCase("String_Node_Str") && combo.ability.equalsIgnoreCase("String_Node_Str")) {
      for (      FireComboStream fs : combo.tasks) {
        if (fs.getLocation() != null && Math.abs(fs.getLocation().distance(loc)) <= radius) {
          fs.remove();
          removed=true;
        }
      }
    }
 else     if (ability.equalsIgnoreCase("String_Node_Str") && combo.ability.equalsIgnoreCase("String_Node_Str")) {
      for (      FireComboStream fs : combo.tasks) {
        if (fs.getLocation() != null && Math.abs(fs.getLocation().distance(loc)) <= radius) {
          fs.remove();
          removed=true;
        }
      }
    }
 else     if (ability.equalsIgnoreCase("String_Node_Str") && combo.ability.equalsIgnoreCase("String_Node_Str")) {
      if (combo.currentLoc != null && Math.abs(combo.currentLoc.distance(loc)) <= radius) {
        instances.remove(combo);
        removed=true;
      }
    }
  }
  return removed;
}

Fixed version (ground truth):
public static boolean removeAroundPoint(Player player,String ability,Location loc,double radius){
  boolean removed=false;
  for (int i=0; i < instances.size(); i++) {
    FireCombo combo=instances.get(i);
    if (combo.getPlayer().equals(player))     continue;
    if (ability.equalsIgnoreCase("String_Node_Str") && combo.ability.equalsIgnoreCase("String_Node_Str")) {
      for (      FireComboStream fs : combo.tasks) {
        if (fs.getLocation() != null && fs.getLocation().getWorld() == loc.getWorld() && Math.abs(fs.getLocation().distance(loc)) <= radius) {
          fs.remove();
          removed=true;
        }
      }
    }
 else     if (ability.equalsIgnoreCase("String_Node_Str") && combo.ability.equalsIgnoreCase("String_Node_Str")) {
      for (      FireComboStream fs : combo.tasks) {
        if (fs.getLocation() != null && Math.abs(fs.getLocation().distance(loc)) <= radius) {
          fs.remove();
          removed=true;
        }
      }
    }
 else     if (ability.equalsIgnoreCase("String_Node_Str") && combo.ability.equalsIgnoreCase("String_Node_Str")) {
      if (combo.currentLoc != null && Math.abs(combo.currentLoc.distance(loc)) <= radius) {
        instances.remove(combo);
        removed=true;
      }
    }
  }
  return removed;
}
Program: 134142
Project: 134142
Buggy source:
public static boolean isWithinShield(Location loc){
  for (  Player player : instances.keySet()) {
    FireShield fshield=instances.get(player);
    Location playerLoc=fshield.player.getLocation();
    if (fshield.shield) {
      if (playerLoc.distance(loc) <= fshield.radius)       return true;
    }
 else {
      Location tempLoc=playerLoc.clone().add(playerLoc.multiply(fshield.discradius));
      if (tempLoc.distance(loc) <= fshield.discradius)       return true;
    }
  }
  return false;
}

Fixed version (ground truth):
public static boolean isWithinShield(Location loc){
  for (  Player player : instances.keySet()) {
    FireShield fshield=instances.get(player);
    Location playerLoc=fshield.player.getLocation();
    if (fshield.shield) {
      if (playerLoc.getWorld() != loc.getWorld())       return false;
      if (playerLoc.distance(loc) <= fshield.radius)       return true;
    }
 else {
      Location tempLoc=playerLoc.clone().add(playerLoc.multiply(fshield.discradius));
      if (tempLoc.getWorld() != loc.getWorld())       return false;
      if (tempLoc.distance(loc) <= fshield.discradius)       return true;
    }
  }
  return false;
}
Program: 134144
Project: 134144
Buggy source:
public static void progressAll(){
  for (  int ID : instances.keySet()) {
    instances.get(ID).progress();
  }
}

Fixed version (ground truth):
public static void progressAll(){
  for (  int ID : instances.keySet()) {
    if (instances.get(ID) == null) {
      instances.remove(ID);
      continue;
    }
    instances.get(ID).progress();
  }
}