nus-yam/ex-repair huggingface dataset:
Program: 133879
Project: 133879
Buggy source:
private void displayWaterSpiral(Location location){
  if (!useBlockSpiral) {
    return;
  }
  double maxHeight=player.getLocation().getY() - location.getY() - .5;
  double height=0;
  rotation+=.4;
  int i=0;
  while (height < maxHeight) {
    i+=20;
    height+=.4;
    double angle=(i * Math.PI / 180);
    double x=1 * Math.cos(angle + rotation);
    double z=1 * Math.sin(angle + rotation);
    Location loc=location.clone().getBlock().getLocation().add(.5,.5,.5);
    loc.add(x,height,z);
    Block block=loc.getBlock();
    if (block.getType().equals(Material.AIR) || !GeneralMethods.isSolid(block)) {
      blocks.add(new TempBlock(block,Material.STATIONARY_WATER,(byte)1));
      AFFECTED_BLOCKS.put(block,block);
    }
  }
}

Fixed version (ground truth):
private void displayWaterSpiral(Location location){
  if (!useBlockSpiral) {
    return;
  }
  double maxHeight=player.getLocation().getY() - location.getY() - .5;
  double height=0;
  rotation+=.4;
  int i=0;
  while (height < maxHeight) {
    i+=20;
    height+=.4;
    double angle=(i * Math.PI / 180);
    double x=1 * Math.cos(angle + rotation);
    double z=1 * Math.sin(angle + rotation);
    Location loc=location.clone().getBlock().getLocation().add(.5,.5,.5);
    loc.add(x,height,z);
    Block block=loc.getBlock();
    if ((!TempBlock.isTempBlock(block)) && (block.getType().equals(Material.AIR) || !GeneralMethods.isSolid(block))) {
      blocks.add(new TempBlock(block,Material.STATIONARY_WATER,(byte)1));
      AFFECTED_BLOCKS.put(block,block);
    }
  }
}
Program: 133880
Project: 133880
Buggy source:
public static boolean removeSpouts(Location loc0,double radius,Player sourcePlayer){
  boolean removed=false;
  for (  WaterSpout spout : getAbilities(sourcePlayer,WaterSpout.class)) {
    Location top=spout.getLocation();
    Location base=spout.getBase().getLocation();
    double dist=top.getBlockY() - base.getBlockY();
    for (double d=0; d <= dist; d+=0.25) {
      Location spoutl=base.clone().add(0,d,0);
      if (loc0.distance(spoutl) <= radius) {
        removed=true;
        spout.remove();
      }
    }
  }
  return removed;
}

Fixed version (ground truth):
public static boolean removeSpouts(Location loc0,double radius,Player sourcePlayer){
  boolean removed=false;
  for (  WaterSpout spout : getAbilities(WaterSpout.class)) {
    Location top=spout.getLocation();
    Location base=spout.getBase().getLocation();
    double dist=top.getBlockY() - base.getBlockY();
    for (double d=0; d <= dist; d+=0.5) {
      Location spoutl=base.clone().add(0,d,0);
      if (loc0.distance(spoutl) <= radius) {
        removed=true;
        spout.remove();
      }
    }
  }
  return removed;
}
Program: 133881
Project: 133881
Buggy source:
private void freeze(){
  clearWave();
  if (!bPlayer.canIcebend()) {
    return;
  }
  double freezeradius=currentRadius;
  if (freezeradius > maxFreezeRadius) {
    freezeradius=maxFreezeRadius;
  }
  for (  Block block : GeneralMethods.getBlocksAroundPoint(frozenLocation,freezeradius)) {
    if (GeneralMethods.isRegionProtectedFromBuild(this,block.getLocation()) || GeneralMethods.isRegionProtectedFromBuild(player,"String_Node_Str",block.getLocation())) {
      continue;
    }
 else     if (TempBlock.isTempBlock(block)) {
      continue;
    }
    if (block.getType() == Material.AIR || block.getType() == Material.SNOW) {
      new TempBlock(block,Material.ICE,(byte)0);
      frozenBlocks.put(block,block);
    }
    if (isWater(block)) {
      PhaseChangeFreeze.freeze(player,block);
    }
    if (isPlant(block) && block.getType() != Material.LEAVES) {
      block.breakNaturally();
      new TempBlock(block,Material.ICE,(byte)0);
      frozenBlocks.put(block,block);
    }
    for (    Block sound : frozenBlocks.keySet()) {
      if ((new Random()).nextInt(4) == 0) {
        playWaterbendingSound(sound.getLocation());
      }
    }
  }
}

Fixed version (ground truth):
private void freeze(){
  clearWave();
  if (!bPlayer.canIcebend()) {
    return;
  }
  double freezeradius=currentRadius;
  if (freezeradius > maxFreezeRadius) {
    freezeradius=maxFreezeRadius;
  }
  for (  Block block : GeneralMethods.getBlocksAroundPoint(frozenLocation,freezeradius)) {
    if (GeneralMethods.isRegionProtectedFromBuild(this,block.getLocation()) || GeneralMethods.isRegionProtectedFromBuild(player,"String_Node_Str",block.getLocation())) {
      continue;
    }
 else     if (TempBlock.isTempBlock(block)) {
      continue;
    }
    Block oldBlock=block;
    if (block.getType() == Material.AIR || block.getType() == Material.SNOW || isWater(block)) {
      new TempBlock(block,Material.ICE,(byte)0);
      frozenBlocks.put(block,oldBlock.getType());
    }
    if (isPlant(block) && block.getType() != Material.LEAVES) {
      block.breakNaturally();
      new TempBlock(block,Material.ICE,(byte)0);
      frozenBlocks.put(block,oldBlock.getType());
    }
    for (    Block sound : frozenBlocks.keySet()) {
      if ((new Random()).nextInt(4) == 0) {
        playWaterbendingSound(sound.getLocation());
      }
    }
  }
}
Program: 133882
Project: 133882
Buggy source:
public ConcurrentHashMap<Block,Block> getFrozenBlocks(){
  return frozenBlocks;
}

Fixed version (ground truth):
public ConcurrentHashMap<Block,Material> getFrozenBlocks(){
  return frozenBlocks;
}
Program: 133883
Project: 133883
Buggy source:
public static boolean removeSpouts(Location loc0,double radius,Player sourcePlayer){
  boolean removed=false;
  for (  WaterSpout spout : getAbilities(WaterSpout.class)) {
    Location top=spout.getLocation();
    Location base=spout.getBase().getLocation();
    double dist=top.getBlockY() - base.getBlockY();
    for (double d=0; d <= dist; d+=0.5) {
      Location spoutl=base.clone().add(0,d,0);
      if (loc0.distance(spoutl) <= radius) {
        removed=true;
        spout.remove();
      }
    }
  }
  return removed;
}

Fixed version (ground truth):
public static boolean removeSpouts(Location loc0,double radius,Player sourcePlayer){
  boolean removed=false;
  for (  WaterSpout spout : getAbilities(WaterSpout.class)) {
    if (!spout.player.equals(sourcePlayer)) {
      Location top=spout.getLocation();
      Location base=spout.getBase().getLocation();
      double dist=top.getBlockY() - base.getBlockY();
      for (double d=0; d <= dist; d+=0.5) {
        Location spoutl=base.clone().add(0,d,0);
        if (loc0.distance(spoutl) <= radius) {
          removed=true;
          spout.remove();
        }
      }
    }
  }
  return removed;
}
Program: 133884
Project: 133884
Buggy source:
public FireBlastCharged(Player player){
  super(player);
  if (!bPlayer.canBend(this) || hasAbility(player,FireBlastCharged.class)) {
    return;
  }
  this.charged=false;
  this.launched=false;
  this.canDamageBlocks=getConfig().getBoolean("String_Node_Str");
  this.dissipate=getConfig().getBoolean("String_Node_Str");
  this.chargeTime=getConfig().getLong("String_Node_Str");
  this.time=System.currentTimeMillis();
  this.interval=25;
  this.collisionRadius=getConfig().getDouble("String_Node_Str");
  this.maxDamage=getConfig().getDouble("String_Node_Str");
  this.range=getConfig().getDouble("String_Node_Str");
  this.damageRadius=getConfig().getDouble("String_Node_Str");
  this.explosionRadius=getConfig().getDouble("String_Node_Str");
  this.fireTicks=getConfig().getDouble("String_Node_Str");
  this.innerRadius=damageRadius / 2;
  if (isDay(player.getWorld())) {
    this.chargeTime=(long)(chargeTime / getDayFactor());
  }
  if (bPlayer.isAvatarState()) {
    this.chargeTime=0;
    this.maxDamage=AvatarState.getValue(maxDamage);
  }
  this.range=getDayFactor(range);
  if (!player.getEyeLocation().getBlock().isLiquid()) {
    start();
  }
  if (isDay(player.getWorld())) {
    this.maxDamage=getDayFactor(maxDamage);
  }
}

Fixed version (ground truth):
public FireBlastCharged(Player player){
  super(player);
  if (!bPlayer.canBend(this) || hasAbility(player,FireBlastCharged.class)) {
    return;
  }
  this.charged=false;
  this.launched=false;
  this.canDamageBlocks=getConfig().getBoolean("String_Node_Str");
  this.dissipate=getConfig().getBoolean("String_Node_Str");
  this.chargeTime=getConfig().getLong("String_Node_Str");
  this.time=System.currentTimeMillis();
  this.interval=25;
  this.collisionRadius=getConfig().getDouble("String_Node_Str");
  this.maxDamage=getConfig().getDouble("String_Node_Str");
  this.range=getConfig().getDouble("String_Node_Str");
  this.damageRadius=getConfig().getDouble("String_Node_Str");
  this.explosionRadius=getConfig().getDouble("String_Node_Str");
  this.fireTicks=getConfig().getDouble("String_Node_Str");
  this.innerRadius=damageRadius / 2;
  if (isDay(player.getWorld())) {
    this.chargeTime=(long)(chargeTime / getDayFactor());
    this.maxDamage=getDayFactor(maxDamage);
    this.range=getDayFactor(range);
  }
  if (bPlayer.isAvatarState()) {
    this.chargeTime=0;
    this.maxDamage=AvatarState.getValue(maxDamage);
  }
  if (!player.getEyeLocation().getBlock().isLiquid()) {
    start();
  }
}
Program: 133885
Project: 133885
Buggy source:
public void returnWater(){
  if (location != null) {
    new WaterReturn(player,location.getBlock());
  }
}

Fixed version (ground truth):
public void returnWater(){
  if (location != null) {
    if (player.isOnline()) {
      new WaterReturn(player,location.getBlock());
    }
  }
}
Program: 133889
Project: 133889
Buggy source:
@Override public void execute(CommandSender sender,List<String> args){
  if (!hasPermission(sender) || !correctLength(sender,args.size(),0,1) || !isPlayer(sender)) {
    return;
  }
 else   if (MultiAbilityManager.hasMultiAbilityBound((Player)sender)) {
    sender.sendMessage(ChatColor.RED + cantEditBinds);
    return;
  }
  BendingPlayer bPlayer=BendingPlayer.getBendingPlayer(sender.getName());
  if (bPlayer == null) {
    GeneralMethods.createBendingPlayer(((Player)sender).getUniqueId(),sender.getName());
    bPlayer=BendingPlayer.getBendingPlayer(sender.getName());
  }
  if (args.size() == 0) {
    bPlayer.getAbilities().clear();
    for (int i=1; i <= 9; i++) {
      GeneralMethods.saveAbility(bPlayer,i,null);
    }
    sender.sendMessage(ChatColor.YELLOW + cleared);
  }
 else   if (args.size() == 1) {
    try {
      int slot=Integer.parseInt(args.get(0));
      if (slot < 1 || slot > 9) {
        sender.sendMessage(ChatColor.RED + wrongNumber);
      }
      if (bPlayer.getAbilities().get(slot) != null) {
        bPlayer.getAbilities().remove(slot);
        GeneralMethods.saveAbility(bPlayer,slot,null);
        sender.sendMessage(clearedSlot.replace("String_Node_Str",String.valueOf(slot)));
      }
 else {
        sender.sendMessage(ChatColor.YELLOW + alreadyEmpty);
      }
    }
 catch (    NumberFormatException e) {
      sender.sendMessage(ChatColor.RED + wrongNumber);
    }
  }
}

Fixed version (ground truth):
@Override public void execute(CommandSender sender,List<String> args){
  if (!hasPermission(sender) || !correctLength(sender,args.size(),0,1) || !isPlayer(sender)) {
    return;
  }
 else   if (MultiAbilityManager.hasMultiAbilityBound((Player)sender)) {
    sender.sendMessage(ChatColor.RED + cantEditBinds);
    return;
  }
  BendingPlayer bPlayer=BendingPlayer.getBendingPlayer(sender.getName());
  if (bPlayer == null) {
    GeneralMethods.createBendingPlayer(((Player)sender).getUniqueId(),sender.getName());
    bPlayer=BendingPlayer.getBendingPlayer(sender.getName());
  }
  if (args.size() == 0) {
    bPlayer.getAbilities().clear();
    for (int i=1; i <= 9; i++) {
      GeneralMethods.saveAbility(bPlayer,i,null);
    }
    sender.sendMessage(ChatColor.YELLOW + cleared);
  }
 else   if (args.size() == 1) {
    try {
      int slot=Integer.parseInt(args.get(0));
      if (slot < 1 || slot > 9) {
        sender.sendMessage(ChatColor.RED + wrongNumber);
      }
      if (bPlayer.getAbilities().get(slot) != null) {
        bPlayer.getAbilities().remove(slot);
        GeneralMethods.saveAbility(bPlayer,slot,null);
        sender.sendMessage(ChatColor.YELLOW + clearedSlot.replace("String_Node_Str",String.valueOf(slot)));
      }
 else {
        sender.sendMessage(ChatColor.YELLOW + alreadyEmpty);
      }
    }
 catch (    NumberFormatException e) {
      sender.sendMessage(ChatColor.RED + wrongNumber);
    }
  }
}
Program: 133892
Project: 133892
Buggy source:
@Override public void progress(){
  if (!bPlayer.canBendIgnoreCooldowns(this) || GeneralMethods.isRegionProtectedFromBuild(this,location)) {
    remove();
    return;
  }
  speedFactor=speed * (ProjectKorra.time_step / 1000.0);
  ticks++;
  if (ticks > MAX_TICKS) {
    remove();
    return;
  }
  Block block=location.getBlock();
  if (GeneralMethods.isSolid(block) || block.isLiquid()) {
    if (block.getType() == Material.FURNACE && powerFurnace) {
      Furnace furnace=(Furnace)block.getState();
      furnace.setBurnTime((short)800);
      furnace.setCookTime((short)800);
      furnace.update();
    }
 else     if (BlazeArc.isIgnitable(player,block.getRelative(BlockFace.UP))) {
      ignite(location);
    }
    remove();
    return;
  }
  if (location.distanceSquared(origin) > range * range) {
    remove();
    return;
  }
  WaterAbility.removeWaterSpouts(location,player);
  AirAbility.removeAirSpouts(location,player);
  Player source=player;
  if (EarthBlast.annihilateBlasts(location,collisionRadius,source) || WaterManipulation.annihilateBlasts(location,collisionRadius,source) || FireBlast.annihilateBlasts(location,collisionRadius,source)) {
    remove();
    return;
  }
  for (  Entity entity : GeneralMethods.getEntitiesAroundPoint(location,collisionRadius)) {
    affect(entity);
    if (entity instanceof LivingEntity) {
      break;
    }
  }
  advanceLocation();
}

Fixed version (ground truth):
@Override public void progress(){
  if (!bPlayer.canBendIgnoreCooldowns(this) || GeneralMethods.isRegionProtectedFromBuild(this,location)) {
    remove();
    return;
  }
  speedFactor=speed * (ProjectKorra.time_step / 1000.0);
  ticks++;
  if (ticks > MAX_TICKS) {
    remove();
    return;
  }
  Block block=location.getBlock();
  if (GeneralMethods.isSolid(block) || block.isLiquid()) {
    if (block.getType() == Material.FURNACE && powerFurnace) {
      Furnace furnace=(Furnace)block.getState();
      furnace.setBurnTime((short)800);
      furnace.setCookTime((short)800);
      furnace.update();
    }
 else     if (BlazeArc.isIgnitable(player,block.getRelative(BlockFace.UP))) {
      ignite(location);
    }
    remove();
    return;
  }
  if (location.distanceSquared(origin) > range * range) {
    remove();
    return;
  }
  WaterAbility.removeWaterSpouts(location,player);
  AirAbility.removeAirSpouts(location,player);
  EarthAbility.removeSandSpouts(location,player);
  Player source=player;
  if (EarthBlast.annihilateBlasts(location,collisionRadius,source) || WaterManipulation.annihilateBlasts(location,collisionRadius,source) || FireBlast.annihilateBlasts(location,collisionRadius,source)) {
    remove();
    return;
  }
  for (  Entity entity : GeneralMethods.getEntitiesAroundPoint(location,collisionRadius)) {
    affect(entity);
    if (entity instanceof LivingEntity) {
      break;
    }
  }
  advanceLocation();
}
Program: 133894
Project: 133894
Buggy source:
private boolean prepare(){
  Block sourceBlock=getWaterSourceBlock(player,sourceGrabRange,canUsePlantSource);
  if (sourceBlock != null) {
    if (isPlant(sourceBlock)) {
      fullSource=false;
    }
    ParticleEffect.LARGE_SMOKE.display(getWaterSourceBlock(player,sourceGrabRange,canUsePlantSource).getLocation().clone().add(0.5,0.5,0.5),0,0,0,0F,4);
    return true;
  }
 else   if (WaterReturn.hasWaterBottle(player)) {
    WaterReturn.emptyWaterBottle(player);
    fullSource=false;
    return true;
  }
  return false;
}

Fixed version (ground truth):
private boolean prepare(){
  Block sourceBlock=getWaterSourceBlock(player,sourceGrabRange,canUsePlantSource);
  if (sourceBlock != null) {
    if (isPlant(sourceBlock)) {
      fullSource=false;
    }
    ParticleEffect.LARGE_SMOKE.display(getWaterSourceBlock(player,sourceGrabRange,canUsePlantSource).getLocation().clone().add(0.5,0.5,0.5),0,0,0,0F,4);
    new PlantRegrowth(player,sourceBlock);
    sourceBlock.setType(Material.AIR);
    return true;
  }
 else   if (WaterReturn.hasWaterBottle(player)) {
    WaterReturn.emptyWaterBottle(player);
    fullSource=false;
    return true;
  }
  return false;
}
Program: 133897
Project: 133897
Buggy source:
@EventHandler(priority=EventPriority.LOWEST,ignoreCancelled=true) public void onEntityDamageByBlock(EntityDamageByBlockEvent event){
  Block block=event.getDamager();
  if (TempBlock.isTempBlock(block)) {
    if (EarthAbility.isEarthbendable(block.getType()) && GeneralMethods.isSolid(block)) {
      event.setCancelled(true);
      return;
    }
  }
}

Fixed version (ground truth):
@EventHandler(priority=EventPriority.LOWEST,ignoreCancelled=true) public void onEntityDamageByBlock(EntityDamageByBlockEvent event){
  Block block=event.getDamager();
  if (block == null)   return;
  if (TempBlock.isTempBlock(block)) {
    if (EarthAbility.isEarthbendable(block.getType()) && GeneralMethods.isSolid(block)) {
      event.setCancelled(true);
      return;
    }
  }
}
Program: 133898
Project: 133898
Buggy source:
@Override public void progress(){
  if (!bPlayer.canBendIgnoreBindsCooldowns(this) || GeneralMethods.isRegionProtectedFromBuild(this,location)) {
    remove();
    return;
  }
  speedFactor=speed * (ProjectKorra.time_step / 1000.0);
  ticks++;
  if (ticks > MAX_TICKS) {
    remove();
    return;
  }
  Block block=location.getBlock();
  if (GeneralMethods.isSolid(block) || block.isLiquid()) {
    if (block.getType() == Material.FURNACE && powerFurnace) {
      Furnace furnace=(Furnace)block.getState();
      furnace.setBurnTime((short)800);
      furnace.setCookTime((short)800);
      furnace.update();
    }
 else     if (BlazeArc.isIgnitable(player,block.getRelative(BlockFace.UP))) {
      ignite(location);
    }
    remove();
    return;
  }
  if (location.distanceSquared(origin) > range * range) {
    remove();
    return;
  }
  WaterAbility.removeWaterSpouts(location,player);
  AirAbility.removeAirSpouts(location,player);
  Player source=player;
  if (EarthBlast.annihilateBlasts(location,collisionRadius,source) || WaterManipulation.annihilateBlasts(location,collisionRadius,source) || FireBlast.annihilateBlasts(location,collisionRadius,source)) {
    remove();
    return;
  }
  for (  Entity entity : GeneralMethods.getEntitiesAroundPoint(location,collisionRadius)) {
    affect(entity);
    if (entity instanceof LivingEntity) {
      break;
    }
  }
  advanceLocation();
}

Fixed version (ground truth):
@Override public void progress(){
  if (!bPlayer.canBendIgnoreBindsCooldowns(this) || GeneralMethods.isRegionProtectedFromBuild(this,location)) {
    remove();
    return;
  }
  if (isFireBurst && !bPlayer.canBend(CoreAbility.getAbility("String_Node_Str"))) {
    remove();
    return;
  }
 else   if (!isFireBurst && !bPlayer.canBend(CoreAbility.getAbility("String_Node_Str"))) {
    remove();
    return;
  }
  speedFactor=speed * (ProjectKorra.time_step / 1000.0);
  ticks++;
  if (ticks > MAX_TICKS) {
    remove();
    return;
  }
  Block block=location.getBlock();
  if (GeneralMethods.isSolid(block) || block.isLiquid()) {
    if (block.getType() == Material.FURNACE && powerFurnace) {
      Furnace furnace=(Furnace)block.getState();
      furnace.setBurnTime((short)800);
      furnace.setCookTime((short)800);
      furnace.update();
    }
 else     if (BlazeArc.isIgnitable(player,block.getRelative(BlockFace.UP))) {
      ignite(location);
    }
    remove();
    return;
  }
  if (location.distanceSquared(origin) > range * range) {
    remove();
    return;
  }
  WaterAbility.removeWaterSpouts(location,player);
  AirAbility.removeAirSpouts(location,player);
  Player source=player;
  if (EarthBlast.annihilateBlasts(location,collisionRadius,source) || WaterManipulation.annihilateBlasts(location,collisionRadius,source) || FireBlast.annihilateBlasts(location,collisionRadius,source)) {
    remove();
    return;
  }
  for (  Entity entity : GeneralMethods.getEntitiesAroundPoint(location,collisionRadius)) {
    affect(entity);
    if (entity instanceof LivingEntity) {
      break;
    }
  }
  advanceLocation();
}
Program: 133899
Project: 133899
Buggy source:
@Override public void progress(){
  if (!bPlayer.canBendIgnoreBindsCooldowns(this) && !launched) {
    remove();
    return;
  }
 else   if (!player.isSneaking() && !charged) {
    remove();
    return;
  }
  if (System.currentTimeMillis() > startTime + chargeTime) {
    charged=true;
  }
  if (!player.isSneaking() && !launched) {
    launched=true;
    location=player.getEyeLocation();
    origin=location.clone();
    direction=location.getDirection().normalize().multiply(collisionRadius);
  }
  if (System.currentTimeMillis() > time + interval) {
    if (launched) {
      if (GeneralMethods.isRegionProtectedFromBuild(this,location)) {
        remove();
        return;
      }
    }
    time=System.currentTimeMillis();
    if (!launched && !charged) {
      return;
    }
 else     if (!launched) {
      player.getWorld().playEffect(player.getEyeLocation(),Effect.MOBSPAWNER_FLAMES,0,3);
      return;
    }
    location=location.clone().add(direction);
    if (location.distanceSquared(origin) > range * range) {
      remove();
      return;
    }
    if (GeneralMethods.isSolid(location.getBlock())) {
      explode();
      return;
    }
 else     if (location.getBlock().isLiquid()) {
      remove();
      return;
    }
    executeFireball();
  }
}

Fixed version (ground truth):
@Override public void progress(){
  if (!bPlayer.canBendIgnoreBindsCooldowns(this) && !launched) {
    remove();
    return;
  }
 else   if (!bPlayer.canBend(CoreAbility.getAbility("String_Node_Str")) && !launched) {
    remove();
    return;
  }
 else   if (!player.isSneaking() && !charged) {
    remove();
    return;
  }
  if (System.currentTimeMillis() > startTime + chargeTime) {
    charged=true;
  }
  if (!player.isSneaking() && !launched) {
    launched=true;
    location=player.getEyeLocation();
    origin=location.clone();
    direction=location.getDirection().normalize().multiply(collisionRadius);
  }
  if (System.currentTimeMillis() > time + interval) {
    if (launched) {
      if (GeneralMethods.isRegionProtectedFromBuild(this,location)) {
        remove();
        return;
      }
    }
    time=System.currentTimeMillis();
    if (!launched && !charged) {
      return;
    }
 else     if (!launched) {
      player.getWorld().playEffect(player.getEyeLocation(),Effect.MOBSPAWNER_FLAMES,0,3);
      return;
    }
    location=location.clone().add(direction);
    if (location.distanceSquared(origin) > range * range) {
      remove();
      return;
    }
    if (GeneralMethods.isSolid(location.getBlock())) {
      explode();
      return;
    }
 else     if (location.getBlock().isLiquid()) {
      remove();
      return;
    }
    executeFireball();
  }
}
Program: 133900
Project: 133900
Buggy source:
@Override public void progress(){
  if (player.isDead() || !player.isOnline()) {
    remove();
    return;
  }
 else   if (distanceTravelled > spearRange) {
    remove();
    return;
  }
  if (!hitEntity) {
    progressSpear();
  }
 else {
    createIceBall();
  }
  if (layer >= spearSphere) {
    remove();
    return;
  }
 else   if (!canPlaceBlock(location.getBlock())) {
    if (canFreeze) {
      createSpear();
    }
    remove();
    return;
  }
}

Fixed version (ground truth):
@Override public void progress(){
  if (player.isDead() || !player.isOnline()) {
    remove();
    return;
  }
 else   if (distanceTravelled > spearRange) {
    remove();
    return;
  }
  if (!hitEntity) {
    progressSpear();
  }
 else {
    createIceBall();
    remove();
  }
  if (layer >= spearSphere) {
    remove();
    return;
  }
 else   if (!canPlaceBlock(location.getBlock())) {
    if (canFreeze) {
      createSpear();
    }
    remove();
    return;
  }
}
Program: 133902
Project: 133902
Buggy source:
@Override public void progress(){
  if (!bPlayer.canBendIgnoreCooldowns(this)) {
    remove();
    return;
  }
  getFloor();
  if (floorblock == null) {
    remove();
    return;
  }
  Vector velocity=player.getEyeLocation().getDirection().clone();
  velocity.setY(0);
  velocity=velocity.clone().normalize().multiply(speed);
  if (System.currentTimeMillis() > startTime + interval) {
    if (player.getVelocity().length() < speed * .5) {
      remove();
      return;
    }
    spinScooter();
  }
  double distance=player.getLocation().getY() - (double)floorblock.getY();
  double dx=Math.abs(distance - 2.4);
  if (distance > 2.75) {
    velocity.setY(-.25 * dx * dx);
  }
 else   if (distance < 2) {
    velocity.setY(.25 * dx * dx);
  }
 else {
    velocity.setY(0);
  }
  Location loc=player.getLocation();
  if (!WaterAbility.isWater(player.getLocation().add(0,2,0).getBlock())) {
    loc.setY((double)floorblock.getY() + 1.5);
  }
 else {
    return;
  }
  player.setSprinting(false);
  player.removePotionEffect(PotionEffectType.SPEED);
  player.setVelocity(velocity);
  if (random.nextInt(4) == 0) {
    playAirbendingSound(player.getLocation());
  }
}

Fixed version (ground truth):
@Override public void progress(){
  if (!bPlayer.canBendIgnoreBindsCooldowns(this)) {
    remove();
    return;
  }
  getFloor();
  if (floorblock == null) {
    remove();
    return;
  }
  Vector velocity=player.getEyeLocation().getDirection().clone();
  velocity.setY(0);
  velocity=velocity.clone().normalize().multiply(speed);
  if (System.currentTimeMillis() > startTime + interval) {
    if (player.getVelocity().length() < speed * .5) {
      remove();
      return;
    }
    spinScooter();
  }
  double distance=player.getLocation().getY() - (double)floorblock.getY();
  double dx=Math.abs(distance - 2.4);
  if (distance > 2.75) {
    velocity.setY(-.25 * dx * dx);
  }
 else   if (distance < 2) {
    velocity.setY(.25 * dx * dx);
  }
 else {
    velocity.setY(0);
  }
  Location loc=player.getLocation();
  if (!WaterAbility.isWater(player.getLocation().add(0,2,0).getBlock())) {
    loc.setY((double)floorblock.getY() + 1.5);
  }
 else {
    return;
  }
  player.setSprinting(false);
  player.removePotionEffect(PotionEffectType.SPEED);
  player.setVelocity(velocity);
  if (random.nextInt(4) == 0) {
    playAirbendingSound(player.getLocation());
  }
}
Program: 133904
Project: 133904
Buggy source:
public Torrent(Player player){
  super(player);
  this.layer=0;
  this.startAngle=0;
  this.maxLayer=getConfig().getInt("String_Node_Str");
  this.push=getConfig().getDouble("String_Node_Str");
  this.angle=getConfig().getDouble("String_Node_Str");
  this.radius=getConfig().getDouble("String_Node_Str");
  this.maxUpwardForce=getConfig().getDouble("String_Node_Str");
  this.interval=getConfig().getLong("String_Node_Str");
  this.damage=getConfig().getDouble("String_Node_Str");
  this.deflectDamage=getConfig().getDouble("String_Node_Str");
  this.range=getConfig().getDouble("String_Node_Str");
  this.selectRange=getConfig().getDouble("String_Node_Str");
  this.cooldown=getConfig().getLong("String_Node_Str");
  this.blocks=new ArrayList<>();
  this.launchedBlocks=new ArrayList<>();
  this.hurtEntities=new ArrayList<>();
  Torrent oldTorrent=getAbility(player,Torrent.class);
  if (oldTorrent != null) {
    if (!oldTorrent.sourceSelected) {
      oldTorrent.use();
      bPlayer.addCooldown("String_Node_Str",oldTorrent.cooldown);
      return;
    }
 else {
      oldTorrent.remove();
    }
  }
  if (bPlayer.isOnCooldown("String_Node_Str")) {
    return;
  }
  time=System.currentTimeMillis();
  sourceBlock=BlockSource.getWaterSourceBlock(player,selectRange,ClickType.LEFT_CLICK,true,true,bPlayer.canPlantbend());
  if (sourceBlock != null && !GeneralMethods.isRegionProtectedFromBuild(this,sourceBlock.getLocation())) {
    sourceSelected=true;
    start();
  }
}

Fixed version (ground truth):
public Torrent(Player player){
  super(player);
  this.layer=0;
  this.startAngle=0;
  this.maxLayer=getConfig().getInt("String_Node_Str");
  this.push=getConfig().getDouble("String_Node_Str");
  this.angle=getConfig().getDouble("String_Node_Str");
  this.radius=getConfig().getDouble("String_Node_Str");
  this.maxUpwardForce=getConfig().getDouble("String_Node_Str");
  this.interval=getConfig().getLong("String_Node_Str");
  this.damage=getConfig().getDouble("String_Node_Str");
  this.successiveDamage=getConfig().getDouble("String_Node_Str");
  this.maxHits=getConfig().getInt("String_Node_Str");
  this.deflectDamage=getConfig().getDouble("String_Node_Str");
  this.range=getConfig().getDouble("String_Node_Str");
  this.selectRange=getConfig().getDouble("String_Node_Str");
  this.cooldown=getConfig().getLong("String_Node_Str");
  this.blocks=new ArrayList<>();
  this.launchedBlocks=new ArrayList<>();
  this.hurtEntities=new ArrayList<>();
  Torrent oldTorrent=getAbility(player,Torrent.class);
  if (oldTorrent != null) {
    if (!oldTorrent.sourceSelected) {
      oldTorrent.use();
      bPlayer.addCooldown("String_Node_Str",oldTorrent.cooldown);
      return;
    }
 else {
      oldTorrent.remove();
    }
  }
  if (bPlayer.isOnCooldown("String_Node_Str")) {
    return;
  }
  time=System.currentTimeMillis();
  sourceBlock=BlockSource.getWaterSourceBlock(player,selectRange,ClickType.LEFT_CLICK,true,true,bPlayer.canPlantbend());
  if (sourceBlock != null && !GeneralMethods.isRegionProtectedFromBuild(this,sourceBlock.getLocation())) {
    sourceSelected=true;
    start();
  }
}
Program: 133905
Project: 133905
Buggy source:
private void affect(Entity entity,Vector direction){
  if (entity.getEntityId() == player.getEntityId()) {
    return;
  }
  if (direction.getY() > maxUpwardForce) {
    direction.setY(maxUpwardForce);
  }
  if (!freeze) {
    entity.setVelocity(direction.multiply(push));
  }
  if (entity instanceof LivingEntity && !hurtEntities.contains(entity)) {
    double damageDealt=getNightFactor(damage);
    DamageHandler.damageEntity(entity,damageDealt,this);
    AirAbility.breakBreathbendingHold(entity);
    hurtEntities.add(entity);
    ((LivingEntity)entity).setNoDamageTicks(0);
  }
}

Fixed version (ground truth):
private void affect(Entity entity,Vector direction){
  if (entity.getEntityId() == player.getEntityId()) {
    return;
  }
  if (direction.getY() > maxUpwardForce) {
    direction.setY(maxUpwardForce);
  }
  if (!freeze) {
    entity.setVelocity(direction.multiply(push));
  }
  if (entity instanceof LivingEntity && !hurtEntities.contains(entity)) {
    double damageDealt=getNightFactor(damage);
    if (hits > 1 && hits <= maxHits) {
      damageDealt=getNightFactor(successiveDamage);
    }
    if (hits == maxHits) {
      hits=maxHits + 1;
    }
 else {
      hits+=1;
    }
    DamageHandler.damageEntity(entity,damageDealt,this);
    AirAbility.breakBreathbendingHold(entity);
    hurtEntities.add(entity);
    ((LivingEntity)entity).setNoDamageTicks(0);
  }
}
Program: 133906
Project: 133906
Buggy source:
@EventHandler public void onPlayerKick(PlayerKickEvent event){
  if (event.isCancelled()) {
    return;
  }
  AirFlight.remove(event.getPlayer());
}

Fixed version (ground truth):
@EventHandler public void onPlayerKick(PlayerKickEvent event){
  if (event.isCancelled()) {
    return;
  }
  AirFlight.remove(event.getPlayer());
  JUMPS.remove(event.getPlayer());
}
Program: 133907
Project: 133907
Buggy source:
@EventHandler public void onPlayerQuit(PlayerQuitEvent event){
  Player player=event.getPlayer();
  BendingPlayer bPlayer=BendingPlayer.getBendingPlayer(player);
  if (bPlayer != null) {
    if (TOGGLED_OUT.contains(player.getUniqueId()) && bPlayer.isToggled()) {
      TOGGLED_OUT.remove(player.getUniqueId());
    }
    if (!bPlayer.isToggled()) {
      TOGGLED_OUT.add(player.getUniqueId());
    }
  }
  if (Commands.invincible.contains(player.getName())) {
    Commands.invincible.remove(player.getName());
  }
  Preset.unloadPreset(player);
  EarthArmor earthArmor=CoreAbility.getAbility(player,EarthArmor.class);
  PlantArmor plantArmor=CoreAbility.getAbility(player,PlantArmor.class);
  MetalClips metalClips=CoreAbility.getAbility(player,MetalClips.class);
  if (earthArmor != null) {
    earthArmor.remove();
  }
  if (plantArmor != null) {
    plantArmor.remove();
  }
  if (metalClips != null) {
    metalClips.remove();
  }
  MultiAbilityManager.remove(player);
  AirFlight.remove(event.getPlayer());
}

Fixed version (ground truth):
@EventHandler public void onPlayerQuit(PlayerQuitEvent event){
  Player player=event.getPlayer();
  BendingPlayer bPlayer=BendingPlayer.getBendingPlayer(player);
  if (bPlayer != null) {
    if (TOGGLED_OUT.contains(player.getUniqueId()) && bPlayer.isToggled()) {
      TOGGLED_OUT.remove(player.getUniqueId());
    }
    if (!bPlayer.isToggled()) {
      TOGGLED_OUT.add(player.getUniqueId());
    }
  }
  if (Commands.invincible.contains(player.getName())) {
    Commands.invincible.remove(player.getName());
  }
  Preset.unloadPreset(player);
  EarthArmor earthArmor=CoreAbility.getAbility(player,EarthArmor.class);
  PlantArmor plantArmor=CoreAbility.getAbility(player,PlantArmor.class);
  MetalClips metalClips=CoreAbility.getAbility(player,MetalClips.class);
  if (earthArmor != null) {
    earthArmor.remove();
  }
  if (plantArmor != null) {
    plantArmor.remove();
  }
  if (metalClips != null) {
    metalClips.remove();
  }
  MultiAbilityManager.remove(player);
  AirFlight.remove(player);
  JUMPS.remove(player);
}
Program: 133909
Project: 133909
Buggy source:
@EventHandler public void onPlayerJoin(PlayerJoinEvent e){
  Player player=e.getPlayer();
  GeneralMethods.createBendingPlayer(e.getPlayer().getUniqueId(),player.getName());
}

Fixed version (ground truth):
@EventHandler public void onPlayerJoin(PlayerJoinEvent e){
  Player player=e.getPlayer();
  JUMPS.put(player,player.getStatistic(Statistic.JUMP));
  GeneralMethods.createBendingPlayer(e.getPlayer().getUniqueId(),player.getName());
}
Program: 133913
Project: 133913
Buggy source:
@Override public void progress(){
  if (!bPlayer.canBendIgnoreBindsCooldowns(this)) {
    return;
  }
  if (formed) {
    if (System.currentTimeMillis() > startTime + duration && !complete) {
      complete=true;
      bPlayer.addCooldown(this);
      remove();
      return;
    }
  }
 else   if (System.currentTimeMillis() > time + interval) {
    if (!moveBlocks()) {
      return;
    }
    if (inPosition()) {
      formArmor();
    }
  }
}

Fixed version (ground truth):
@Override public void progress(){
  if (!bPlayer.canBendIgnoreBindsCooldowns(this)) {
    return;
  }
  if (formed) {
    PassiveHandler.checkArmorPassives(player);
    if (System.currentTimeMillis() > startTime + duration && !complete) {
      complete=true;
      bPlayer.addCooldown(this);
      remove();
      return;
    }
  }
 else   if (System.currentTimeMillis() > time + interval) {
    if (!moveBlocks()) {
      return;
    }
    if (inPosition()) {
      formArmor();
    }
  }
}
Program: 133914
Project: 133914
Buggy source:
public FireJet(Player player){
  super(player);
  FireJet oldJet=getAbility(player,FireJet.class);
  if (oldJet != null) {
    oldJet.remove();
    return;
  }
 else   if (bPlayer.isOnCooldown(this)) {
    return;
  }
  this.avatarStateToggled=getConfig().getBoolean("String_Node_Str");
  this.duration=getConfig().getLong("String_Node_Str");
  this.speed=getConfig().getDouble("String_Node_Str");
  this.cooldown=getConfig().getLong("String_Node_Str");
  this.random=new Random();
  this.speed=getDayFactor(speed);
  Block block=player.getLocation().getBlock();
  if (BlazeArc.isIgnitable(player,block) || block.getType() == Material.AIR || bPlayer.isAvatarState()) {
    player.setVelocity(player.getEyeLocation().getDirection().clone().normalize().multiply(speed));
    if (canFireGrief()) {
      createTempFire(block.getLocation());
    }
 else {
      block.setType(Material.FIRE);
    }
    new Flight(player);
    player.setAllowFlight(true);
    time=System.currentTimeMillis();
    start();
    bPlayer.addCooldown(this);
  }
}

Fixed version (ground truth):
public FireJet(Player player){
  super(player);
  FireJet oldJet=getAbility(player,FireJet.class);
  if (oldJet != null) {
    oldJet.remove();
    return;
  }
 else   if (bPlayer.isOnCooldown(this)) {
    return;
  }
  if (hasAbility(player,AirSpout.class)) {
    AirSpout abil=getAbility(player,AirSpout.class);
    abil.remove();
  }
 else   if (hasAbility(player,SandSpout.class)) {
    SandSpout abil=getAbility(player,SandSpout.class);
    abil.remove();
  }
  this.avatarStateToggled=getConfig().getBoolean("String_Node_Str");
  this.duration=getConfig().getLong("String_Node_Str");
  this.speed=getConfig().getDouble("String_Node_Str");
  this.cooldown=getConfig().getLong("String_Node_Str");
  this.random=new Random();
  this.speed=getDayFactor(speed);
  Block block=player.getLocation().getBlock();
  if (BlazeArc.isIgnitable(player,block) || block.getType() == Material.AIR || bPlayer.isAvatarState()) {
    player.setVelocity(player.getEyeLocation().getDirection().clone().normalize().multiply(speed));
    if (canFireGrief()) {
      createTempFire(block.getLocation());
    }
 else {
      block.setType(Material.FIRE);
    }
    new Flight(player);
    player.setAllowFlight(true);
    time=System.currentTimeMillis();
    start();
    bPlayer.addCooldown(this);
  }
}
Program: 133918
Project: 133918
Buggy source:
public static void handleJumpPassives(){
  int air=AirPassive.getJumpPower();
  int chi=ChiPassive.getJumpPower();
  for (  Player player : Bukkit.getOnlinePlayers()) {
    if (ConfigManager.defaultConfig.get().getStringList("String_Node_Str").contains(player.getWorld().getName())) {
      return;
    }
    BendingPlayer bPlayer=BendingPlayer.getBendingPlayer(player);
    if (bPlayer == null)     continue;
    if (!bPlayer.hasElement(Element.AIR))     air=0;
    if (!bPlayer.hasElement(Element.CHI))     chi=0;
    int max=0;
    if (CoreAbility.hasAbility(player,AcrobatStance.class)) {
      AcrobatStance abil=CoreAbility.getAbility(player,AcrobatStance.class);
      max=Math.max(air,chi);
      max=Math.max(max,abil.getSpeed());
    }
 else {
      max=Math.max(air,chi);
      if (max == 0) {
        continue;
      }
    }
    if (player.isSprinting()) {
      player.addPotionEffect(new PotionEffect(PotionEffectType.JUMP,3,max - 1),false);
    }
  }
}

Fixed version (ground truth):
public static void handleJumpPassives(){
  int air=AirPassive.getJumpPower();
  int chi=ChiPassive.getJumpPower();
  for (  Player player : Bukkit.getOnlinePlayers()) {
    if (ConfigManager.defaultConfig.get().getStringList("String_Node_Str").contains(player.getWorld().getName())) {
      continue;
    }
    BendingPlayer bPlayer=BendingPlayer.getBendingPlayer(player);
    if (bPlayer == null)     continue;
    if (!bPlayer.hasElement(Element.AIR))     air=0;
    if (!bPlayer.hasElement(Element.CHI))     chi=0;
    int max=0;
    if (CoreAbility.hasAbility(player,AcrobatStance.class)) {
      AcrobatStance abil=CoreAbility.getAbility(player,AcrobatStance.class);
      max=Math.max(air,chi);
      max=Math.max(max,abil.getSpeed());
    }
 else {
      max=Math.max(air,chi);
      if (max == 0) {
        continue;
      }
    }
    if (player.isSprinting()) {
      player.addPotionEffect(new PotionEffect(PotionEffectType.JUMP,3,max - 1),false);
    }
  }
}
Program: 133922
Project: 133922
Buggy source:
public static ArrayList<TempBlock> getTempLandBlocks(){
  return TEMP_LAND_BLOCKS;
}

Fixed version (ground truth):
public static ConcurrentHashMap<Block,TempBlock> getTempLandBlocks(){
  return TEMP_LAND_BLOCKS;
}
Program: 133924
Project: 133924
Buggy source:
public static Material getRevertMaterial(){
  return REVERT_MATERIAL;
}

Fixed version (ground truth):
public static Material getRevertMaterial(){
  Material m=Material.STONE;
  LavaFlow lf=(LavaFlow)CoreAbility.getAbility("String_Node_Str");
  m=lf.revertMaterial;
  return m;
}
Program: 133925
Project: 133925
Buggy source:
/** 
 * Creates a LavaBlock and appends the TempBlock to our arraylist called TEMP_LAVA_BLOCKS. If ALLOW_NATURAL_FLOW is turned on then this method will remove the block from TempBlock.instances, which will allow the lava to flow naturally.
 * @param block the block that will be turned to lava
 */
public void createLava(Block block){
  if (isEarthbendable(block)) {
    TempBlock tblock=new TempBlock(block,Material.STATIONARY_LAVA,(byte)0);
    TEMP_LAVA_BLOCKS.add(tblock);
    affectedBlocks.add(tblock);
    if (allowNaturalFlow) {
      TempBlock.instances.remove(block);
    }
  }
}

Fixed version (ground truth):
/** 
 * Creates a LavaBlock and appends the TempBlock to our arraylist called TEMP_LAVA_BLOCKS. If ALLOW_NATURAL_FLOW is turned on then this method will remove the block from TempBlock.instances, which will allow the lava to flow naturally.
 * @param block the block that will be turned to lava
 */
public void createLava(Block block){
  if (isEarth(block) || isSand(block) || isMetal(block)) {
    TempBlock tblock=new TempBlock(block,Material.STATIONARY_LAVA,(byte)0);
    TEMP_LAVA_BLOCKS.put(block,tblock);
    affectedBlocks.add(tblock);
    if (allowNaturalFlow) {
      TempBlock.instances.remove(block);
    }
  }
}
Program: 133926
Project: 133926
Buggy source:
public static ArrayList<TempBlock> getTempLavaBlocks(){
  return TEMP_LAVA_BLOCKS;
}

Fixed version (ground truth):
public static ConcurrentHashMap<Block,TempBlock> getTempLavaBlocks(){
  return TEMP_LAVA_BLOCKS;
}
Program: 133927
Project: 133927
Buggy source:
/** 
 * Removes a lava block if it is inside of our ArrayList of TempBlocks.
 * @param testBlock the block to attempt to remove
 */
@SuppressWarnings("String_Node_Str") public void removeLava(Block testBlock){
  for (int i=0; i < TEMP_LAVA_BLOCKS.size(); i++) {
    TempBlock tblock=TEMP_LAVA_BLOCKS.get(i);
    Block block=tblock.getBlock();
    if (block.equals(testBlock)) {
      tblock.revertBlock();
      TEMP_LAVA_BLOCKS.remove(i);
      affectedBlocks.remove(tblock);
      return;
    }
  }
  TempBlock tblock=new TempBlock(testBlock,REVERT_MATERIAL,testBlock.getData());
  affectedBlocks.add(tblock);
  TEMP_LAND_BLOCKS.add(tblock);
}

Fixed version (ground truth):
/** 
 * Removes a lava block if it is inside of our ArrayList of TempBlocks.
 * @param testBlock the block to attempt to remove
 */
@SuppressWarnings("String_Node_Str") public void removeLava(Block testBlock){
  if (TEMP_LAVA_BLOCKS.containsKey(testBlock)) {
    TempBlock tb=TEMP_LAVA_BLOCKS.get(testBlock);
    tb.revertBlock();
    TEMP_LAVA_BLOCKS.remove(testBlock);
    affectedBlocks.remove(tb);
    return;
  }
  TempBlock tblock=new TempBlock(testBlock,revertMaterial,testBlock.getData());
  affectedBlocks.add(tblock);
  TEMP_LAND_BLOCKS.put(testBlock,tblock);
}
Program: 133929
Project: 133929
Buggy source:
public WaterSpoutWave(Player player,AbilityType type){
  super(player);
  this.charging=false;
  this.iceWave=false;
  this.iceOnly=false;
  this.plant=getConfig().getBoolean("String_Node_Str");
  this.radius=getConfig().getDouble("String_Node_Str");
  this.waveRadius=getConfig().getDouble("String_Node_Str");
  this.animationSpeed=getConfig().getDouble("String_Node_Str");
  this.selectRange=getConfig().getDouble("String_Node_Str");
  this.speed=getConfig().getDouble("String_Node_Str");
  this.damage=getConfig().getDouble("String_Node_Str");
  this.chargeTime=getConfig().getLong("String_Node_Str");
  this.flightTime=getConfig().getLong("String_Node_Str");
  this.cooldown=getConfig().getLong("String_Node_Str");
  this.affectedBlocks=new ConcurrentHashMap<>();
  this.affectedEntities=new ArrayList<>();
  this.tasks=new ArrayList<>();
  this.damage=getNightFactor(this.damage);
  if (!bPlayer.canBend(this)) {
    return;
  }
  this.time=System.currentTimeMillis();
  this.type=type;
  start();
  if (type == AbilityType.CLICK) {
    progress();
  }
}

Fixed version (ground truth):
public WaterSpoutWave(Player player,AbilityType type){
  super(player);
  this.charging=false;
  this.iceWave=false;
  this.iceOnly=false;
  this.plant=getConfig().getBoolean("String_Node_Str");
  this.radius=getConfig().getDouble("String_Node_Str");
  this.waveRadius=getConfig().getDouble("String_Node_Str");
  this.thawRadius=getConfig().getDouble("String_Node_Str");
  this.animationSpeed=getConfig().getDouble("String_Node_Str");
  this.selectRange=getConfig().getDouble("String_Node_Str");
  this.speed=getConfig().getDouble("String_Node_Str");
  this.damage=getConfig().getDouble("String_Node_Str");
  this.chargeTime=getConfig().getLong("String_Node_Str");
  this.flightTime=getConfig().getLong("String_Node_Str");
  this.cooldown=getConfig().getLong("String_Node_Str");
  this.affectedBlocks=new ConcurrentHashMap<>();
  this.affectedEntities=new ArrayList<>();
  this.tasks=new ArrayList<>();
  this.damage=getNightFactor(this.damage);
  if (!bPlayer.canBend(this)) {
    return;
  }
  this.time=System.currentTimeMillis();
  this.type=type;
  start();
  if (type == AbilityType.CLICK) {
    progress();
  }
}
Program: 133931
Project: 133931
Buggy source:
@SuppressWarnings("String_Node_Str") public EarthArmor(Player player){
  super(player);
  if (hasAbility(player,EarthArmor.class) || !bPlayer.canBend(this)) {
    return;
  }
  this.formed=false;
  this.complete=false;
  this.interval=2000;
  this.cooldown=getConfig().getLong("String_Node_Str");
  this.duration=getConfig().getLong("String_Node_Str");
  this.strength=getConfig().getInt("String_Node_Str");
  this.selectRange=getConfig().getDouble("String_Node_Str");
  headBlock=getTargetEarthBlock((int)selectRange);
  if (!GeneralMethods.isRegionProtectedFromBuild(this,headBlock.getLocation()) && getEarthbendableBlocksLength(headBlock,new Vector(0,-1,0),2) >= 2) {
    this.legsBlock=headBlock.getRelative(BlockFace.DOWN);
    this.headType=headBlock.getType();
    this.legsType=legsBlock.getType();
    this.headData=headBlock.getData();
    this.legsData=legsBlock.getData();
    this.headBlockLocation=headBlock.getLocation();
    this.legsBlockLocation=legsBlock.getLocation();
    Block oldHeadBlock=headBlock;
    Block oldLegsBlock=legsBlock;
    if (!moveBlocks()) {
      return;
    }
    if (isEarthRevertOn()) {
      addTempAirBlock(oldHeadBlock);
      addTempAirBlock(oldLegsBlock);
    }
 else {
      GeneralMethods.removeBlock(oldHeadBlock);
      GeneralMethods.removeBlock(oldLegsBlock);
    }
    start();
  }
}

Fixed version (ground truth):
@SuppressWarnings("String_Node_Str") public EarthArmor(Player player){
  super(player);
  if (hasAbility(player,EarthArmor.class) || !bPlayer.canBend(this)) {
    return;
  }
  if (hasAbility(player,PlantArmor.class)) {
    PlantArmor abil=getAbility(player,PlantArmor.class);
    abil.remove();
    player.sendMessage("String_Node_Str");
  }
  this.formed=false;
  this.complete=false;
  this.interval=2000;
  this.cooldown=getConfig().getLong("String_Node_Str");
  this.duration=getConfig().getLong("String_Node_Str");
  this.strength=getConfig().getInt("String_Node_Str");
  this.selectRange=getConfig().getDouble("String_Node_Str");
  headBlock=getTargetEarthBlock((int)selectRange);
  if (!GeneralMethods.isRegionProtectedFromBuild(this,headBlock.getLocation()) && getEarthbendableBlocksLength(headBlock,new Vector(0,-1,0),2) >= 2) {
    this.legsBlock=headBlock.getRelative(BlockFace.DOWN);
    this.headType=headBlock.getType();
    this.legsType=legsBlock.getType();
    this.headData=headBlock.getData();
    this.legsData=legsBlock.getData();
    this.headBlockLocation=headBlock.getLocation();
    this.legsBlockLocation=legsBlock.getLocation();
    Block oldHeadBlock=headBlock;
    Block oldLegsBlock=legsBlock;
    if (!moveBlocks()) {
      return;
    }
    if (isEarthRevertOn()) {
      addTempAirBlock(oldHeadBlock);
      addTempAirBlock(oldLegsBlock);
    }
 else {
      GeneralMethods.removeBlock(oldHeadBlock);
      GeneralMethods.removeBlock(oldLegsBlock);
    }
    start();
  }
}