nus-yam/ex-repair huggingface dataset:
Program: 133932
Project: 133932
Buggy source:
public PlantArmor(Player player){
  super(player);
  this.resistance=getConfig().getInt("String_Node_Str");
  this.range=getConfig().getInt("String_Node_Str");
  this.duration=getConfig().getLong("String_Node_Str");
  this.cooldown=getConfig().getLong("String_Node_Str");
  this.range=getNightFactor(range);
  this.duration=(long)getNightFactor(duration);
  if (hasAbility(player,PlantArmor.class)) {
    return;
  }
 else   if (bPlayer.isOnCooldown(this)) {
    return;
  }
  block=getPlantSourceBlock(player,range,true);
  if (block == null) {
    return;
  }
  location=block.getLocation();
  hadEffect=player.hasPotionEffect(PotionEffectType.DAMAGE_RESISTANCE);
  if (!canUse()) {
    return;
  }
  plantbending=new PlantRegrowth(player,block);
  blockType=block.getType();
  block.setType(Material.AIR);
  start();
}

Fixed version (ground truth):
public PlantArmor(Player player){
  super(player);
  this.resistance=getConfig().getInt("String_Node_Str");
  this.range=getConfig().getInt("String_Node_Str");
  this.duration=getConfig().getLong("String_Node_Str");
  this.cooldown=getConfig().getLong("String_Node_Str");
  this.range=getNightFactor(range);
  this.duration=(long)getNightFactor(duration);
  if (hasAbility(player,PlantArmor.class)) {
    return;
  }
 else   if (!bPlayer.canBend(this)) {
    return;
  }
  if (hasAbility(player,EarthArmor.class)) {
    EarthArmor abil=getAbility(player,EarthArmor.class);
    abil.remove();
    player.sendMessage("String_Node_Str");
  }
  block=getPlantSourceBlock(player,range,true);
  if (block == null) {
    return;
  }
  location=block.getLocation();
  hadEffect=player.hasPotionEffect(PotionEffectType.DAMAGE_RESISTANCE);
  if (!canUse()) {
    return;
  }
  plantbending=new PlantRegrowth(player,block);
  blockType=block.getType();
  block.setType(Material.AIR);
  start();
}
Program: 133933
Project: 133933
Buggy source:
public AirBurst(Player player,boolean isFallBurst){
  super(player);
  if (bPlayer.isOnCooldown(this)) {
    remove();
    return;
  }
  this.isFallBurst=isFallBurst;
  this.isCharged=false;
  this.playerFallDistance=player.getFallDistance();
  this.chargeTime=getConfig().getLong("String_Node_Str");
  this.fallThreshold=getConfig().getDouble("String_Node_Str");
  this.pushFactor=getConfig().getDouble("String_Node_Str");
  this.damage=getConfig().getDouble("String_Node_Str");
  this.blastAnglePhi=getConfig().getDouble("String_Node_Str");
  this.blastAngleTheta=getConfig().getDouble("String_Node_Str");
  this.sneakParticles=getConfig().getInt("String_Node_Str");
  this.particlePercentage=getConfig().getDouble("String_Node_Str");
  this.blasts=new ArrayList<>();
  this.affectedEntities=new ArrayList<>();
  if (bPlayer.isAvatarState()) {
    this.chargeTime=0;
    this.damage=AvatarState.getValue(this.damage);
  }
  start();
}

Fixed version (ground truth):
public AirBurst(Player player,boolean isFallBurst){
  super(player);
  if (bPlayer.isOnCooldown(this)) {
    remove();
    return;
  }
  if (hasAbility(player,AirBurst.class)) {
    if (!getAbility(player,AirBurst.class).isCharged()) {
      return;
    }
  }
  this.isFallBurst=isFallBurst;
  this.isCharged=false;
  this.playerFallDistance=player.getFallDistance();
  this.chargeTime=getConfig().getLong("String_Node_Str");
  this.fallThreshold=getConfig().getDouble("String_Node_Str");
  this.pushFactor=getConfig().getDouble("String_Node_Str");
  this.damage=getConfig().getDouble("String_Node_Str");
  this.blastAnglePhi=getConfig().getDouble("String_Node_Str");
  this.blastAngleTheta=getConfig().getDouble("String_Node_Str");
  this.sneakParticles=getConfig().getInt("String_Node_Str");
  this.particlePercentage=getConfig().getDouble("String_Node_Str");
  this.blasts=new ArrayList<>();
  this.affectedEntities=new ArrayList<>();
  if (bPlayer.isAvatarState()) {
    this.chargeTime=0;
    this.damage=AvatarState.getValue(this.damage);
  }
  start();
}
Program: 133934
Project: 133934
Buggy source:
public Shockwave(Player player,boolean fall){
  super(player);
  this.angle=Math.toRadians(getConfig().getDouble("String_Node_Str"));
  this.cooldown=getConfig().getLong("String_Node_Str");
  this.chargeTime=getConfig().getLong("String_Node_Str");
  this.threshold=getConfig().getDouble("String_Node_Str");
  this.range=getConfig().getDouble("String_Node_Str");
  if (bPlayer.isAvatarState()) {
    chargeTime=0;
    cooldown=0;
  }
  if (!bPlayer.canBend(this)) {
    return;
  }
  if (fall) {
    fallShockwave();
  }
  start();
}

Fixed version (ground truth):
public Shockwave(Player player,boolean fall){
  super(player);
  this.angle=Math.toRadians(getConfig().getDouble("String_Node_Str"));
  this.cooldown=getConfig().getLong("String_Node_Str");
  this.chargeTime=getConfig().getLong("String_Node_Str");
  this.threshold=getConfig().getDouble("String_Node_Str");
  this.range=getConfig().getDouble("String_Node_Str");
  if (bPlayer.isAvatarState()) {
    chargeTime=0;
    cooldown=0;
  }
  if (!bPlayer.canBend(this) || hasAbility(player,Shockwave.class)) {
    return;
  }
  if (fall) {
    fallShockwave();
  }
  start();
}
Program: 133935
Project: 133935
Buggy source:
public FireBlastCharged(Player player){
  super(player);
  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();
  }
}

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());
  }
  if (bPlayer.isAvatarState()) {
    this.chargeTime=0;
    this.maxDamage=AvatarState.getValue(maxDamage);
  }
  this.range=getDayFactor(range);
  if (!player.getEyeLocation().getBlock().isLiquid()) {
    start();
  }
}
Program: 133938
Project: 133938
Buggy source:
/** 
 * Redraws the blocks for this instance of EarthSmash.
 */
public void draw(){
  if (currentBlocks.size() == 0) {
    remove();
    return;
  }
  for (  BlockRepresenter blockRep : currentBlocks) {
    Block block=location.clone().add(blockRep.getX(),blockRep.getY(),blockRep.getZ()).getBlock();
    if (player != null && isTransparent(block)) {
      affectedBlocks.add(new TempBlock(block,blockRep.getType(),blockRep.getData()));
      getPreventEarthbendingBlocks().add(block);
    }
  }
}

Fixed version (ground truth):
/** 
 * Redraws the blocks for this instance of EarthSmash.
 */
public void draw(){
  if (currentBlocks.size() == 0) {
    remove();
    return;
  }
  for (  BlockRepresenter blockRep : currentBlocks) {
    Block block=location.clone().add(blockRep.getX(),blockRep.getY(),blockRep.getZ()).getBlock();
    if (block.getType().equals(Material.SAND) || block.getType().equals(Material.GRAVEL)) {
      addTempAirBlock(block);
    }
    if (player != null && isTransparent(block)) {
      affectedBlocks.add(new TempBlock(block,blockRep.getType(),blockRep.getData()));
      getPreventEarthbendingBlocks().add(block);
    }
  }
}
Program: 133939
Project: 133939
Buggy source:
@SuppressWarnings("String_Node_Str") public SurgeWall(Player player){
  super(player);
  this.interval=getConfig().getLong("String_Node_Str");
  this.cooldown=getConfig().getLong("String_Node_Str");
  this.range=getConfig().getDouble(RANGE_CONFIG);
  this.radius=getConfig().getDouble("String_Node_Str");
  SurgeWave wave=getAbility(player,SurgeWave.class);
  if (wave != null && !wave.isProgressing()) {
    wave.moveWater();
    return;
  }
  if (bPlayer.isAvatarState()) {
    radius=AvatarState.getValue(radius);
  }
  SurgeWall wall=getAbility(player,SurgeWall.class);
  if (wall != null) {
    if (wall.progressing) {
      freezeThaw();
    }
 else     if (prepare()) {
      wall.remove();
      start();
      time=System.currentTimeMillis();
    }
  }
 else   if (prepare()) {
    start();
    time=System.currentTimeMillis();
  }
  if (bPlayer.isOnCooldown("String_Node_Str")) {
    return;
  }
 else   if (wall == null && WaterReturn.hasWaterBottle(player)) {
    Location eyeLoc=player.getEyeLocation();
    Block block=eyeLoc.add(eyeLoc.getDirection().normalize()).getBlock();
    if (isTransparent(player,block) && isTransparent(player,eyeLoc.getBlock())) {
      block.setType(Material.WATER);
      block.setData(FULL);
      wave=new SurgeWave(player);
      wave.setCanHitSelf(false);
      wave.moveWater();
      if (!wave.isProgressing()) {
        block.setType(Material.AIR);
        wave.remove();
      }
 else {
        WaterReturn.emptyWaterBottle(player);
      }
    }
  }
}

Fixed version (ground truth):
@SuppressWarnings("String_Node_Str") public SurgeWall(Player player){
  super(player);
  this.interval=getConfig().getLong("String_Node_Str");
  this.cooldown=getConfig().getLong("String_Node_Str");
  this.range=getConfig().getDouble(RANGE_CONFIG);
  this.radius=getConfig().getDouble("String_Node_Str");
  SurgeWave wave=getAbility(player,SurgeWave.class);
  if (wave != null && !wave.isProgressing()) {
    wave.moveWater();
    return;
  }
  if (bPlayer.isAvatarState()) {
    radius=AvatarState.getValue(radius);
  }
  SurgeWall wall=getAbility(player,SurgeWall.class);
  if (wall != null) {
    if (wall.progressing) {
      wall.freezeThaw();
    }
 else     if (prepare()) {
      wall.remove();
      start();
      time=System.currentTimeMillis();
    }
  }
 else   if (prepare()) {
    start();
    time=System.currentTimeMillis();
  }
  if (bPlayer.isOnCooldown("String_Node_Str")) {
    return;
  }
 else   if (wall == null && WaterReturn.hasWaterBottle(player)) {
    Location eyeLoc=player.getEyeLocation();
    Block block=eyeLoc.add(eyeLoc.getDirection().normalize()).getBlock();
    if (isTransparent(player,block) && isTransparent(player,eyeLoc.getBlock())) {
      block.setType(Material.WATER);
      block.setData(FULL);
      wave=new SurgeWave(player);
      wave.setCanHitSelf(false);
      wave.moveWater();
      if (!wave.isProgressing()) {
        block.setType(Material.AIR);
        wave.remove();
      }
 else {
        WaterReturn.emptyWaterBottle(player);
      }
    }
  }
}
Program: 133940
Project: 133940
Buggy source:
private void getNightAugments(){
  World world=player.getWorld();
  if (isNight(world)) {
    if (GeneralMethods.hasRPG()) {
      if (isLunarEclipse(world)) {
        spearRange=spearRangeFullMoon;
        spearSphere=spearSphereFullMoon;
        spearDuration=spearDurationFullMoon;
      }
 else       if (BendingManager.events.get(world).equalsIgnoreCase("String_Node_Str")) {
        spearRange=spearRangeFullMoon;
        spearSphere=spearSphereFullMoon;
        spearDuration=spearDurationFullMoon;
      }
 else {
        spearRange=spearRangeNight;
        spearSphere=spearSphereNight;
        spearDuration=spearDurationNight;
      }
    }
 else {
      if (isFullMoon(world)) {
        spearRange=spearRangeFullMoon;
        spearSphere=spearSphereFullMoon;
        spearDuration=spearDurationFullMoon;
      }
 else {
        spearRange=spearRangeNight;
        spearSphere=spearSphereNight;
        spearDuration=spearDurationNight;
      }
    }
  }
}

Fixed version (ground truth):
private void getNightAugments(){
  World world=player.getWorld();
  if (isNight(world)) {
    if (GeneralMethods.hasRPG()) {
      if (isLunarEclipse(world)) {
        spearRange=spearRangeFullMoon;
        spearSphere=spearSphereFullMoon;
        spearDuration=spearDurationFullMoon;
      }
 else       if (isFullMoon(world)) {
        spearRange=spearRangeFullMoon;
        spearSphere=spearSphereFullMoon;
        spearDuration=spearDurationFullMoon;
      }
 else {
        spearRange=spearRangeNight;
        spearSphere=spearSphereNight;
        spearDuration=spearDurationNight;
      }
    }
 else {
      if (isFullMoon(world)) {
        spearRange=spearRangeFullMoon;
        spearSphere=spearSphereFullMoon;
        spearDuration=spearDurationFullMoon;
      }
 else {
        spearRange=spearRangeNight;
        spearSphere=spearSphereNight;
        spearDuration=spearDurationNight;
      }
    }
  }
}
Program: 133941
Project: 133941
Buggy source:
private void getAugments(){
  if (ability.equals(Whip.PUNCH)) {
    whipLength=punchLength;
  }
  World world=player.getWorld();
  if (isNight(world)) {
    if (GeneralMethods.hasRPG()) {
      if (isLunarEclipse(world)) {
        if (ability.equals(Whip.PUNCH)) {
          whipLength=punchLengthFullMoon;
        }
 else {
          whipLength=whipLengthFullMoon;
        }
      }
 else       if (BendingManager.events.get(world).equalsIgnoreCase("String_Node_Str")) {
        if (ability.equals(Whip.PUNCH)) {
          whipLength=punchLengthFullMoon;
        }
 else {
          whipLength=whipLengthFullMoon;
        }
      }
 else {
        if (ability.equals(Whip.PUNCH)) {
          whipLength=punchLengthNight;
        }
 else {
          whipLength=whipLengthNight;
        }
      }
    }
 else {
      if (isFullMoon(world)) {
        if (ability.equals(Whip.PUNCH)) {
          whipLength=punchLengthFullMoon;
        }
 else {
          whipLength=whipLengthFullMoon;
        }
      }
 else {
        if (ability.equals(Whip.PUNCH)) {
          whipLength=punchLengthNight;
        }
 else {
          whipLength=whipLengthNight;
        }
      }
    }
  }
}

Fixed version (ground truth):
private void getAugments(){
  if (ability.equals(Whip.PUNCH)) {
    whipLength=punchLength;
  }
  World world=player.getWorld();
  if (isNight(world)) {
    if (GeneralMethods.hasRPG()) {
      if (isLunarEclipse(world)) {
        if (ability.equals(Whip.PUNCH)) {
          whipLength=punchLengthFullMoon;
        }
 else {
          whipLength=whipLengthFullMoon;
        }
      }
 else       if (isFullMoon(world)) {
        if (ability.equals(Whip.PUNCH)) {
          whipLength=punchLengthFullMoon;
        }
 else {
          whipLength=whipLengthFullMoon;
        }
      }
 else {
        if (ability.equals(Whip.PUNCH)) {
          whipLength=punchLengthNight;
        }
 else {
          whipLength=whipLengthNight;
        }
      }
    }
 else {
      if (isFullMoon(world)) {
        if (ability.equals(Whip.PUNCH)) {
          whipLength=punchLengthFullMoon;
        }
 else {
          whipLength=whipLengthFullMoon;
        }
      }
 else {
        if (ability.equals(Whip.PUNCH)) {
          whipLength=punchLengthNight;
        }
 else {
          whipLength=whipLengthNight;
        }
      }
    }
  }
}
Program: 133942
Project: 133942
Buggy source:
public WaterReturn(Player player,Block block){
  super(player);
  if (hasAbility(player,WaterReturn.class)) {
    return;
  }
  this.location=block.getLocation();
  this.range=30;
  this.interval=50;
  this.range=getNightFactor(range);
  if (bPlayer.canBend(this)) {
    if (isTransparent(player,block) && !block.isLiquid() && hasEmptyWaterBottle()) {
      this.block=new TempBlock(block,Material.WATER,(byte)0);
    }
  }
  start();
}

Fixed version (ground truth):
public WaterReturn(Player player,Block block){
  super(player);
  if (hasAbility(player,WaterReturn.class)) {
    return;
  }
  this.location=block.getLocation();
  this.range=30;
  this.interval=50;
  this.range=getNightFactor(range);
  if (bPlayer.canBendIgnoreBindsCooldowns(this)) {
    if (isTransparent(player,block) && ((TempBlock.isTempBlock(block) && block.isLiquid()) || !block.isLiquid()) && hasEmptyWaterBottle()) {
      this.block=new TempBlock(block,Material.WATER,(byte)0);
    }
  }
  start();
}
Program: 133943
Project: 133943
Buggy source:
public boolean canBind(CoreAbility ability){
  if (ability == null || !player.isOnline()) {
    return false;
  }
 else   if (!player.hasPermission("String_Node_Str" + ability.getName())) {
    return false;
  }
 else   if (!hasElement(ability.getElement())) {
    return false;
  }
 else   if (ability instanceof SubAbility) {
    SubAbility subAbil=(SubAbility)ability;
    if (!hasElement(subAbil.getParentElement())) {
      return false;
    }
  }
  return true;
}

Fixed version (ground truth):
public boolean canBind(CoreAbility ability){
  if (ability == null || !player.isOnline()) {
    return false;
  }
 else   if (!player.hasPermission("String_Node_Str" + ability.getName())) {
    return false;
  }
 else   if (!hasElement(ability.getElement())) {
    return false;
  }
 else   if (ability.getElement() instanceof SubElement) {
    SubElement subElement=(SubElement)ability.getElement();
    if (!hasElement(subElement.getParentElement())) {
      return false;
    }
  }
  return true;
}
Program: 133945
Project: 133945
Buggy source:
public boolean isSneakAbility();

Fixed version (ground truth):
/** 
 * Determines if this ability uses the   {@link PlayerToggleSneakEvent} as a controllingmechanism. Currently  {@link WaterPassive} will not work while the player has a sneak abilitybound.
 * @return true if the ability uses sneak as a controlling mechanism
 */
public boolean isSneakAbility();
Program: 133946
Project: 133946
Buggy source:
/** 
 * Determines if this ability is considered harmless against other players. A harmless ability cannot manipulate another player. For example: AirPassive, WaterSpout, AirSpout, and FireJet.
 * @return true if the ability is harmless and should be allowed in both PvP and non-PvP zones.
 */
public boolean isHarmlessAbility();

Fixed version (ground truth):
/** 
 * Determines if this ability is considered harmless against other players. A harmless ability cannot manipulate another player. For example: AirPassive, WaterSpout, AirSpout, and FireJet.
 * @return true if the ability is harmless and should be allowed in both PvP and non-PvP zones
 */
public boolean isHarmlessAbility();
Program: 133947
Project: 133947
Buggy source:
public Player getPlayer();

Fixed version (ground truth):
/** 
 * Returns the player that caused this ability to be initiated. The player can be null in certain circumstances, for example when calling   {@link CoreAbility#getAbility(String)}, or if an ability decided to set player to null.
 * @return the player that this ability belongs to
 */
public Player getPlayer();
Program: 133948
Project: 133948
Buggy source:
public Location getLocation();

Fixed version (ground truth):
/** 
 * Specifies the Location of the ability, which may be slightly inaccurate depending on the Ability implementation. For example, a   {@link TorrentWave} could not be fully specified by asingle location, while it is possible for an  {@link EarthBlast}. The location is useful for making sure that the player is currently in the same world as the ability.
 * @return the location of the Ability
 * @see BendingPlayer#canBend(CoreAbility)
 */
public Location getLocation();
Program: 133949
Project: 133949
Buggy source:
public boolean isExplosiveAbility();

Fixed version (ground truth):
/** 
 * Determines if this ability can cause explosions. For example:   {@link FireBlastCharged}
 */
public boolean isExplosiveAbility();
Program: 133950
Project: 133950
Buggy source:
public String getName();

Fixed version (ground truth):
/** 
 * The name of the ability is used for commands such as <b>/bending display</b> and <b>/bending help</b>. The name is also used for determining the tag for cooldowns  {@link BendingPlayer#addCooldown(Ability)}, therefore if two abilities have the same name they will also share cooldowns. If two classes share the same name (SurgeWall/SurgeWave) but need to have independent cooldowns, then   {@link BendingPlayer#addCooldown(String,long)}should be called explicitly.
 * @return Returns the name of the ability
 */
public String getName();
Program: 133951
Project: 133951
Buggy source:
public boolean isIgniteAbility();

Fixed version (ground truth):
/** 
 * Determines if this ability can ignite blocks. For example:   {@link Blaze},   {@link FireBlast}, and   {@link FireBurst}.
 */
public boolean isIgniteAbility();
Program: 133952
Project: 133952
Buggy source:
public long getCooldown();

Fixed version (ground truth):
/** 
 * @return the cooldown for the ability
 */
public long getCooldown();
Program: 133953
Project: 133953
Buggy source:
public String getDescription();

Fixed version (ground truth):
/** 
 * The description of an ability is a few sentences used to describe how the player can fully utilize the ability. In most cases the description will be specified in the config.yml file and will be retrieved by accessing the FileConfiguration via   {@link CoreAbility#getConfig}.
 * @return the description for this ability
 * @see HelpCommand
 * @see CoreAbility#getDescription()
 */
public String getDescription();
Program: 133954
Project: 133954
Buggy source:
public void remove();

Fixed version (ground truth):
/** 
 * Causes the ability to be removed from existence.
 */
public void remove();
Program: 133955
Project: 133955
Buggy source:
public Element getElement();

Fixed version (ground truth):
/** 
 * Specifies the Element used to represent this type of ability, favoring SubElements over Elements. For example, a LightningAbility would return   {@link Element#LIGHTNING} instead of{@link Element#FIRE}.
 * @return the most accurate Element that this ability belongs to
 * @see SubElement#getParentElement
 */
public Element getElement();
Program: 133956
Project: 133956
Buggy source:
public void progress();

Fixed version (ground truth):
/** 
 * Causes the ability to be updated.
 */
public void progress();
Program: 133957
Project: 133957
Buggy source:
public boolean isHiddenAbility();

Fixed version (ground truth):
/** 
 * A hidden ability is an ability that should not be shown by commands such as <b>/bending display</b> and <b>/bending help</b>. For example: Combos, MultiAbility sub abilities, and helper abilities.
 * @return true if the ability should not be displayed to the players
 */
public boolean isHiddenAbility();
Program: 133958
Project: 133958
Buggy source:
/** 
 * Accessor Method to get the version of the ability.
 * @return The version of the ability as a String.
 */
public String getVersion();

Fixed version (ground truth):
/** 
 * @return The version of the ability as a String.
 */
public String getVersion();
Program: 133959
Project: 133959
Buggy source:
/** 
 * Void Method called whenever ProjectKorra stops and the ability is unloaded.
 */
public void stop();

Fixed version (ground truth):
/** 
 * Called whenever ProjectKorra stops and the ability is unloaded. This method is useful for cleaning up leftover objects such as frozen blocks. Any CoreAbility instances do not need to be cleaned up by stop method, as they will be cleaned up by   {@link CoreAbility#removeAll()}.
 */
public void stop();
Program: 133960
Project: 133960
Buggy source:
public String getAuthor();

Fixed version (ground truth):
/** 
 * @return the name of the author of this AddonAbility
 */
public String getAuthor();
Program: 133961
Project: 133961
Buggy source:
@EventHandler(priority=EventPriority.NORMAL,ignoreCancelled=true) public void onPlayerChat(AsyncPlayerChatEvent event){
  if (event.isCancelled()) {
    return;
  }
 else   if (!plugin.getConfig().getBoolean("String_Node_Str")) {
    return;
  }
  Player player=event.getPlayer();
  BendingPlayer bPlayer=BendingPlayer.getBendingPlayer(player);
  ChatColor color=ChatColor.WHITE;
  if (bPlayer == null) {
    return;
  }
  if (player.hasPermission("String_Node_Str") || bPlayer.getElements().size() > 1) {
    color=ChatColor.valueOf(plugin.getConfig().getString("String_Node_Str"));
  }
 else {
    for (    Element element : Element.getMainElements()) {
      if (bPlayer.hasElement(element)) {
        color=ChatColor.valueOf(plugin.getConfig().getString("String_Node_Str" + element));
        break;
      }
    }
  }
  String format=plugin.getConfig().getString("String_Node_Str");
  format=format.replace("String_Node_Str","String_Node_Str");
  format=format.replace("String_Node_Str",color + player.getDisplayName() + ChatColor.RESET);
  event.setFormat(format);
}

Fixed version (ground truth):
@EventHandler(priority=EventPriority.NORMAL,ignoreCancelled=true) public void onPlayerChat(AsyncPlayerChatEvent event){
  if (event.isCancelled()) {
    return;
  }
 else   if (!plugin.getConfig().getBoolean("String_Node_Str")) {
    return;
  }
  Player player=event.getPlayer();
  BendingPlayer bPlayer=BendingPlayer.getBendingPlayer(player);
  ChatColor color=ChatColor.WHITE;
  if (bPlayer == null) {
    return;
  }
  if (player.hasPermission("String_Node_Str") || bPlayer.getElements().size() > 1) {
    color=ChatColor.valueOf(plugin.getConfig().getString("String_Node_Str"));
  }
 else {
    for (    Element element : Element.getMainElements()) {
      if (bPlayer.hasElement(element)) {
        color=element.getColor();
        break;
      }
    }
  }
  String format=plugin.getConfig().getString("String_Node_Str");
  format=format.replace("String_Node_Str","String_Node_Str");
  format=format.replace("String_Node_Str",color + player.getDisplayName() + ChatColor.RESET);
  event.setFormat(format);
}
Program: 133963
Project: 133963
Buggy source:
/** 
 * Removes every CoreAbility instance that has been started but not yet removed.
 */
public static void removeAll(){
  for (  Set<CoreAbility> setAbils : INSTANCES_BY_CLASS.values()) {
    for (    CoreAbility abil : setAbils) {
      abil.remove();
    }
  }
}

Fixed version (ground truth):
/** 
 * Removes every CoreAbility instance that has been started but not yet removed.
 */
public static void removeAll(){
  for (  Set<CoreAbility> setAbils : INSTANCES_BY_CLASS.values()) {
    for (    CoreAbility abil : setAbils) {
      abil.remove();
    }
  }
  for (  CoreAbility coreAbility : ABILITIES_BY_NAME.values()) {
    if (coreAbility instanceof AddonAbility) {
      AddonAbility addon=(AddonAbility)coreAbility;
      addon.stop();
    }
  }
}
Program: 133966
Project: 133966
Buggy source:
/** 
 * Gets all of the combos for a given element.
 * @param element The element to get combos for
 * @return An ArrayList of the combos for that element
 */
public static ArrayList<String> getCombosForElement(Element element){
  ArrayList<String> list=new ArrayList<String>();
  for (  String comboab : DESCRIPTIONS.keySet()) {
    CoreAbility coreAbil=CoreAbility.getAbility(COMBO_ABILITIES.get(comboab).getAbilities().get(0).getAbilityName());
    if (coreAbil != null && coreAbil.getElement() == element) {
      list.add(comboab);
    }
  }
  Collections.sort(list);
  return list;
}

Fixed version (ground truth):
/** 
 * Gets all of the combos for a given element.
 * @param element The element to get combos for
 * @return An ArrayList of the combos for that element
 */
public static ArrayList<String> getCombosForElement(Element element){
  ArrayList<String> list=new ArrayList<String>();
  for (  String comboab : COMBO_ABILITIES.keySet()) {
    CoreAbility coreAbil=CoreAbility.getAbility(comboab);
    if (coreAbil == null) {
      continue;
    }
    Element abilElement=coreAbil.getElement();
    if (abilElement instanceof SubElement) {
      abilElement=((SubElement)abilElement).getParentElement();
    }
    if (abilElement == element) {
      list.add(comboab);
    }
  }
  Collections.sort(list);
  return list;
}
Program: 133967
Project: 133967
Buggy source:
@Override public void progress(){
  boolean isHovering=isHovering(player);
  if (!bPlayer.canBend(this)) {
    remove();
    return;
  }
 else   if (!player.isSneaking() && !isHovering && !firstProgressIteration) {
    remove();
    return;
  }
 else   if (player.getLocation().subtract(0,0.5,0).getBlock().getType() != Material.AIR) {
    remove();
    return;
  }
  player.setAllowFlight(true);
  if (flight == null) {
    flight=new Flight(player);
    player.setFlying(true);
  }
  if (isHovering) {
    Vector vec=player.getVelocity().clone();
    vec.setY(0);
    player.setVelocity(vec);
  }
 else {
    player.setVelocity(player.getEyeLocation().getDirection().normalize().multiply(speed));
  }
}

Fixed version (ground truth):
@Override public void progress(){
  boolean isHovering=isHovering(player);
  if (!bPlayer.canBend(this)) {
    remove();
    return;
  }
 else   if (!player.isSneaking() && !isHovering && !firstProgressIteration) {
    remove();
    return;
  }
 else   if (player.getLocation().subtract(0,0.5,0).getBlock().getType() != Material.AIR) {
    remove();
    return;
  }
  player.setAllowFlight(true);
  if (flight == null) {
    flight=new Flight(player);
    player.setFlying(true);
  }
  if (isHovering) {
    Vector vec=player.getVelocity().clone();
    vec.setY(0);
    player.setVelocity(vec);
  }
 else {
    player.setVelocity(player.getEyeLocation().getDirection().normalize().multiply(speed));
  }
  firstProgressIteration=false;
}
Program: 133968
Project: 133968
Buggy source:
private void displayAvatar(CommandSender sender){
  List<CoreAbility> abilities=CoreAbility.getAbilitiesByElement(Element.AVATAR);
  if (abilities.isEmpty()) {
    sender.sendMessage(ChatColor.YELLOW + "String_Node_Str" + Element.AVATAR.getColor()+ "String_Node_Str"+ ChatColor.YELLOW+ "String_Node_Str");
    return;
  }
  for (  CoreAbility ability : abilities) {
    if (sender instanceof Player) {
      if (GeneralMethods.canView((Player)sender,ability.getName())) {
        sender.sendMessage(ability.getElement().getColor() + ability.getName());
      }
    }
 else {
      sender.sendMessage(ability.getElement().getColor() + ability.getName());
    }
  }
}

Fixed version (ground truth):
private void displayAvatar(CommandSender sender){
  List<CoreAbility> abilities=CoreAbility.getAbilitiesByElement(Element.AVATAR);
  if (abilities.isEmpty()) {
    sender.sendMessage(ChatColor.YELLOW + "String_Node_Str" + Element.AVATAR.getColor()+ "String_Node_Str"+ ChatColor.YELLOW+ "String_Node_Str");
    return;
  }
  for (  CoreAbility ability : abilities) {
    if (ability.isHiddenAbility()) {
      continue;
    }
    if (sender instanceof Player) {
      if (GeneralMethods.canView((Player)sender,ability.getName())) {
        sender.sendMessage(ability.getElement().getColor() + ability.getName());
      }
    }
 else {
      sender.sendMessage(ability.getElement().getColor() + ability.getName());
    }
  }
}
Program: 133970
Project: 133970
Buggy source:
public void explode(){
  boolean explode=true;
  for (  Block block : GeneralMethods.getBlocksAroundPoint(location,3)) {
    if (GeneralMethods.isRegionProtectedFromBuild(this,block.getLocation())) {
      explode=false;
      break;
    }
  }
  if (explode) {
    if (canDamageBlocks && explosionRadius > 0) {
      explosion=player.getWorld().spawn(location,TNTPrimed.class);
      explosion.setFuseTicks(0);
      double yield=explosionRadius;
      if (!bPlayer.isAvatarState()) {
        yield=getDayFactor(yield,player.getWorld());
      }
 else {
        yield=AvatarState.getValue(yield);
      }
      if (!bPlayer.isAvatarState()) {
        if (isDay(player.getWorld())) {
          yield=(float)getDayFactor(yield);
        }
      }
 else {
        yield=AvatarState.getValue(yield);
      }
      explosion.setYield((float)yield);
      EXPLOSIONS.put(explosion,this);
    }
 else {
      List<Entity> entities=GeneralMethods.getEntitiesAroundPoint(location,damageRadius);
      for (      Entity entity : entities) {
        if (entity instanceof LivingEntity) {
          double slope=-(maxDamage * .5) / (damageRadius - innerRadius);
          double damage=slope * (entity.getLocation().distance(location) - innerRadius) + maxDamage;
          GeneralMethods.damageEntity(this,entity,damage);
        }
      }
      location.getWorld().playSound(location,Sound.EXPLODE,5,1);
      ParticleEffect.EXPLOSION_HUGE.display(new Vector(0,0,0),0,location,256);
    }
  }
  ignite(location);
  remove();
}

Fixed version (ground truth):
public void explode(){
  boolean explode=true;
  for (  Block block : GeneralMethods.getBlocksAroundPoint(location,3)) {
    if (GeneralMethods.isRegionProtectedFromBuild(this,block.getLocation())) {
      explode=false;
      break;
    }
  }
  if (explode) {
    if (canDamageBlocks && explosionRadius > 0) {
      explosion=player.getWorld().spawn(location,TNTPrimed.class);
      explosion.setFuseTicks(0);
      double yield=explosionRadius;
      if (!bPlayer.isAvatarState()) {
        yield=getDayFactor(yield,player.getWorld());
      }
 else {
        yield=AvatarState.getValue(yield);
      }
      explosion.setYield((float)yield);
      EXPLOSIONS.put(explosion,this);
    }
 else {
      List<Entity> entities=GeneralMethods.getEntitiesAroundPoint(location,damageRadius);
      for (      Entity entity : entities) {
        if (entity instanceof LivingEntity) {
          double slope=-(maxDamage * .5) / (damageRadius - innerRadius);
          double damage=slope * (entity.getLocation().distance(location) - innerRadius) + maxDamage;
          GeneralMethods.damageEntity(this,entity,damage);
        }
      }
      location.getWorld().playSound(location,Sound.EXPLODE,5,1);
      ParticleEffect.EXPLOSION_HUGE.display(new Vector(0,0,0),0,location,256);
    }
  }
  ignite(location);
  remove();
}
Program: 133974
Project: 133974
Buggy source:
private EarthSmash aimingAtSmashCheck(Player player,State reqState){
  if (!ALLOW_GRAB)   return null;
  List<Block> blocks=GeneralMethods.getBlocksAroundPoint(GeneralMethods.getTargetedLocation(player,GRAB_DETECTION_RADIUS,GeneralMethods.nonOpaque),1);
  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;
}

Fixed version (ground truth):
private EarthSmash aimingAtSmashCheck(Player player,State reqState){
  if (!ALLOW_GRAB)   return null;
  List<Block> blocks=GeneralMethods.getBlocksAroundPoint(GeneralMethods.getTargetedLocation(player,GRAB_DETECTION_RADIUS,GeneralMethods.nonOpaque),1);
  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(2.5,2))       return smash;
    }
  }
  return null;
}
Program: 133976
Project: 133976
Buggy source:
/** 
 * Attempts to get a   {@link BendingPlayer} from specified player name. thismethod tries to get a  {@link Player} object and gets the uuid and thencalls  {@link #getBendingPlayer(UUID)}
 * @param playerName The name of the Player
 * @return The BendingPlayer object if {@link BendingPlayer#players}contains the player name
 * @see #getBendingPlayer(UUID)
 */
public static BendingPlayer getBendingPlayer(String player){
  OfflinePlayer oPlayer=Bukkit.getPlayer(player);
  if (player == null) {
    oPlayer=Bukkit.getOfflinePlayer(oPlayer.getUniqueId());
  }
  return BendingPlayer.getPlayers().get(oPlayer.getUniqueId());
}

Fixed version (ground truth):
/** 
 * Attempts to get a   {@link BendingPlayer} from specified player name. thismethod tries to get a  {@link Player} object and gets the uuid and thencalls  {@link #getBendingPlayer(UUID)}
 * @param playerName The name of the Player
 * @return The BendingPlayer object if {@link BendingPlayer#players}contains the player name
 * @see #getBendingPlayer(UUID)
 */
public static BendingPlayer getBendingPlayer(String player){
  OfflinePlayer oPlayer=Bukkit.getOfflinePlayer(player);
  if (player == null) {
    oPlayer=Bukkit.getOfflinePlayer(oPlayer.getUniqueId());
  }
  return BendingPlayer.getPlayers().get(oPlayer.getUniqueId());
}
Program: 133978
Project: 133978
Buggy source:
@EventHandler(priority=EventPriority.NORMAL) public void onElementChange(PlayerChangeElementEvent event){
  Player player=event.getTarget();
  Element e=event.getElement();
  String append="String_Node_Str";
  ChatColor color=null;
  boolean chatEnabled=ProjectKorra.plugin.getConfig().getBoolean("String_Node_Str");
  if (GeneralMethods.getBendingPlayer(player.getName()).getElements().size() > 1) {
    append=plugin.getConfig().getString("String_Node_Str");
    color=ChatColor.valueOf(plugin.getConfig().getString("String_Node_Str"));
  }
 else   if (e == Element.Air && chatEnabled) {
    append=plugin.getConfig().getString("String_Node_Str");
    color=AirMethods.getAirColor();
  }
 else   if (e == Element.Water && chatEnabled) {
    append=plugin.getConfig().getString("String_Node_Str");
    color=WaterMethods.getWaterColor();
  }
 else   if (e == Element.Earth && chatEnabled) {
    append=plugin.getConfig().getString("String_Node_Str");
    color=EarthMethods.getEarthColor();
  }
 else   if (e == Element.Fire && chatEnabled) {
    append=plugin.getConfig().getString("String_Node_Str");
    color=FireMethods.getFireColor();
  }
 else   if (e == Element.Chi && chatEnabled) {
    append=plugin.getConfig().getString("String_Node_Str");
    color=ChiMethods.getChiColor();
  }
  if (chatEnabled) {
    player.setDisplayName(player.getName());
    player.setDisplayName(color + append + ChatColor.RESET+ player.getDisplayName());
  }
}

Fixed version (ground truth):
@EventHandler(priority=EventPriority.NORMAL) public void onElementChange(PlayerChangeElementEvent event){
  Player player=event.getTarget();
  Element e=event.getElement();
  String append="String_Node_Str";
  ChatColor color=null;
  boolean chatEnabled=ProjectKorra.plugin.getConfig().getBoolean("String_Node_Str");
  if (GeneralMethods.getBendingPlayer(player.getName()).getElements().size() > 1) {
    append=plugin.getConfig().getString("String_Node_Str");
    color=ChatColor.valueOf(plugin.getConfig().getString("String_Node_Str"));
  }
 else   if (e == Element.Air && chatEnabled) {
    append=plugin.getConfig().getString("String_Node_Str");
    color=AirMethods.getAirColor();
  }
 else   if (e == Element.Water && chatEnabled) {
    append=plugin.getConfig().getString("String_Node_Str");
    color=WaterMethods.getWaterColor();
  }
 else   if (e == Element.Earth && chatEnabled) {
    append=plugin.getConfig().getString("String_Node_Str");
    color=EarthMethods.getEarthColor();
  }
 else   if (e == Element.Fire && chatEnabled) {
    append=plugin.getConfig().getString("String_Node_Str");
    color=FireMethods.getFireColor();
  }
 else   if (e == Element.Chi && chatEnabled) {
    append=plugin.getConfig().getString("String_Node_Str");
    color=ChiMethods.getChiColor();
  }
 else {
    append="String_Node_Str";
    color=ChatColor.WHITE;
  }
  if (chatEnabled) {
    player.setDisplayName(player.getName());
    player.setDisplayName(color + append + ChatColor.RESET+ player.getDisplayName());
  }
}
Program: 133979
Project: 133979
Buggy source:
@SuppressWarnings("String_Node_Str") public EarthArmor(Player player){
  if (instances.containsKey(player)) {
    return;
  }
  BendingPlayer bPlayer=GeneralMethods.getBendingPlayer(player.getName());
  if (bPlayer.isOnCooldown("String_Node_Str"))   return;
  this.player=player;
  headblock=BlockSource.getEarthSourceBlock(player,autoSelectRange,selectRange,ClickType.LEFT_CLICK,false,auto,false,true,EarthMethods.canSandbend(player),false);
  if (BlockSource.isAuto(headblock)) {
    isAuto=true;
  }
 else {
    isAuto=false;
  }
  if (EarthMethods.getEarthbendableBlocksLength(player,headblock,new Vector(0,-1,0),2) >= 2) {
    legsblock=headblock.getRelative(BlockFace.DOWN);
    headtype=headblock.getType();
    legstype=legsblock.getType();
    headdata=headblock.getData();
    legsdata=legsblock.getData();
    headblocklocation=headblock.getLocation();
    legsblocklocation=legsblock.getLocation();
    Block oldheadblock, oldlegsblock;
    oldheadblock=headblock;
    oldlegsblock=legsblock;
    if (!moveBlocks())     return;
    if (ProjectKorra.plugin.getConfig().getBoolean("String_Node_Str")) {
      EarthMethods.addTempAirBlock(oldheadblock);
      EarthMethods.addTempAirBlock(oldlegsblock);
    }
 else {
      GeneralMethods.removeBlock(oldheadblock);
      GeneralMethods.removeBlock(oldlegsblock);
    }
    instances.put(player,this);
  }
}

Fixed version (ground truth):
@SuppressWarnings("String_Node_Str") public EarthArmor(Player player){
  if (instances.containsKey(player)) {
    return;
  }
  BendingPlayer bPlayer=GeneralMethods.getBendingPlayer(player.getName());
  if (bPlayer.isOnCooldown("String_Node_Str"))   return;
  this.player=player;
  headblock=BlockSource.getEarthSourceBlock(player,autoSelectRange,selectRange,ClickType.LEFT_CLICK,false,auto,false,true,EarthMethods.canSandbend(player),false);
  if (BlockSource.isAuto(headblock)) {
    bPlayer.addCooldown("String_Node_Str",autocooldown);
  }
 else {
    bPlayer.addCooldown("String_Node_Str",cooldown);
  }
  if (EarthMethods.getEarthbendableBlocksLength(player,headblock,new Vector(0,-1,0),2) >= 2) {
    legsblock=headblock.getRelative(BlockFace.DOWN);
    headtype=headblock.getType();
    legstype=legsblock.getType();
    headdata=headblock.getData();
    legsdata=legsblock.getData();
    headblocklocation=headblock.getLocation();
    legsblocklocation=legsblock.getLocation();
    Block oldheadblock, oldlegsblock;
    oldheadblock=headblock;
    oldlegsblock=legsblock;
    if (!moveBlocks())     return;
    if (ProjectKorra.plugin.getConfig().getBoolean("String_Node_Str")) {
      EarthMethods.addTempAirBlock(oldheadblock);
      EarthMethods.addTempAirBlock(oldlegsblock);
    }
 else {
      GeneralMethods.removeBlock(oldheadblock);
      GeneralMethods.removeBlock(oldlegsblock);
    }
    instances.put(player,this);
  }
}
Program: 133980
Project: 133980
Buggy source:
public static void moveArmor(Player player){
  if (!instances.containsKey(player))   return;
  EarthArmor eartharmor=instances.get(player);
  if (player.isDead() || !player.isOnline()) {
    eartharmor.cancel();
    eartharmor.removeEffect();
    return;
  }
  if (eartharmor.formed) {
    if (System.currentTimeMillis() > eartharmor.starttime + duration && !eartharmor.complete) {
      eartharmor.complete=true;
      eartharmor.removeEffect();
      eartharmor.cancel();
      if (isAuto == true) {
        GeneralMethods.getBendingPlayer(player.getName()).addCooldown("String_Node_Str",autocooldown);
      }
 else {
        GeneralMethods.getBendingPlayer(player.getName()).addCooldown("String_Node_Str",cooldown);
      }
      return;
    }
  }
 else   if (System.currentTimeMillis() > eartharmor.time + interval) {
    if (!eartharmor.moveBlocks())     return;
    if (eartharmor.inPosition()) {
      eartharmor.formArmor();
    }
  }
}

Fixed version (ground truth):
public static void moveArmor(Player player){
  if (!instances.containsKey(player))   return;
  EarthArmor eartharmor=instances.get(player);
  if (player.isDead() || !player.isOnline()) {
    eartharmor.cancel();
    eartharmor.removeEffect();
    return;
  }
  if (eartharmor.formed) {
    if (System.currentTimeMillis() > eartharmor.starttime + duration && !eartharmor.complete) {
      eartharmor.complete=true;
      eartharmor.removeEffect();
      eartharmor.cancel();
      return;
    }
  }
 else   if (System.currentTimeMillis() > eartharmor.time + interval) {
    if (!eartharmor.moveBlocks())     return;
    if (eartharmor.inPosition()) {
      eartharmor.formArmor();
    }
  }
}
Program: 133981
Project: 133981
Buggy source:
public boolean prepare(){
  BendingPlayer bPlayer=GeneralMethods.getBendingPlayer(player.getName());
  if (bPlayer.isOnCooldown("String_Node_Str"))   return false;
  cancelPrevious();
  Block block=BlockSource.getEarthSourceBlock(player,autoSelectRange,selectRange,ClickType.SHIFT_DOWN,dynamic,auto,dynamic,true,EarthMethods.canSandbend(player),false);
  block(player);
  if (block != null) {
    if (block.getLocation().distance(player.getLocation()) > selectRange) {
      return false;
    }
    if (BlockSource.isAuto(block)) {
      bPlayer.addCooldown("String_Node_Str",autocooldown);
    }
 else {
      bPlayer.addCooldown("String_Node_Str",cooldown);
    }
    sourceblock=block;
    focusBlock();
    return true;
  }
  return false;
}

Fixed version (ground truth):
public boolean prepare(){
  cancelPrevious();
  Block block=BlockSource.getEarthSourceBlock(player,autoSelectRange,selectRange,ClickType.SHIFT_DOWN,dynamic,auto,dynamic,true,EarthMethods.canSandbend(player),false);
  block(player);
  if (block != null) {
    if (block.getLocation().distance(player.getLocation()) > selectRange) {
      return false;
    }
    BendingPlayer bPlayer=GeneralMethods.getBendingPlayer(player.getName());
    if (BlockSource.isAuto(block)) {
      bPlayer.addCooldown("String_Node_Str",autocooldown);
    }
 else {
      bPlayer.addCooldown("String_Node_Str",cooldown);
    }
    sourceblock=block;
    focusBlock();
    return true;
  }
  return false;
}
Program: 133982
Project: 133982
Buggy source:
public EarthBlast(Player player){
  this.player=player;
  if (prepare()) {
    id=ID++;
    if (ID >= Integer.MAX_VALUE)     ID=Integer.MIN_VALUE;
    instances.put(id,this);
    time=System.currentTimeMillis();
  }
}

Fixed version (ground truth):
public EarthBlast(Player player){
  BendingPlayer bPlayer=GeneralMethods.getBendingPlayer(player.getName());
  if (bPlayer.isOnCooldown("String_Node_Str"))   return;
  this.player=player;
  if (prepare()) {
    id=ID++;
    if (ID >= Integer.MAX_VALUE)     ID=Integer.MIN_VALUE;
    instances.put(id,this);
    time=System.currentTimeMillis();
  }
}
Program: 133983
Project: 133983
Buggy source:
public static void throwEarth(Player player){
  ArrayList<EarthBlast> ignore=new ArrayList<EarthBlast>();
  BendingPlayer bPlayer=GeneralMethods.getBendingPlayer(player.getName());
  if (bPlayer.isOnCooldown("String_Node_Str"))   return;
  for (  int id : instances.keySet()) {
    EarthBlast blast=instances.get(id);
    if (blast.player == player && !blast.progressing) {
      blast.throwEarth();
      ignore.add(blast);
    }
  }
  redirectTargettedBlasts(player,ignore);
}

Fixed version (ground truth):
public static void throwEarth(Player player){
  ArrayList<EarthBlast> ignore=new ArrayList<EarthBlast>();
  for (  int id : instances.keySet()) {
    EarthBlast blast=instances.get(id);
    if (blast.player == player && !blast.progressing) {
      blast.throwEarth();
      ignore.add(blast);
    }
  }
  redirectTargettedBlasts(player,ignore);
}
Program: 133985
Project: 133985
Buggy source:
public double getDistanceTraveled(){
  return start.distance(end);
}

Fixed version (ground truth):
public double getDistanceTraveled(){
  if (start.getWorld() != end.getWorld()) {
    return 0;
  }
  return start.distance(end);
}