Program: 97835
Project: 97835
Buggy source:
private void applyPunishment(final LivingEntity entity,final SnipeData v){
switch (this.punishment) {
case FIRE:
    entity.setFireTicks(Punish.TICKS_PER_SECOND * this.punishDuration);
  break;
case LIGHTNING:
entity.getWorld().strikeLightning(entity.getLocation());
break;
case BLINDNESS:
entity.addPotionEffect(new PotionEffect(PotionEffectType.BLINDNESS,Punish.TICKS_PER_SECOND * this.punishDuration,this.punishLevel),true);
break;
case DRUNK:
entity.addPotionEffect(new PotionEffect(PotionEffectType.CONFUSION,Punish.TICKS_PER_SECOND * this.punishDuration,this.punishLevel),true);
break;
case INVERT:
entity.addPotionEffect(new PotionEffect(PotionEffectType.SLOW,Punish.TICKS_PER_SECOND * this.punishDuration,this.punishLevel),true);
break;
case JUMP:
entity.addPotionEffect(new PotionEffect(PotionEffectType.JUMP,Punish.TICKS_PER_SECOND * this.punishDuration,this.punishLevel),true);
break;
case KILL:
entity.damage(Integer.MAX_VALUE);
break;
case RANDOMTP:
final Random _rand=new Random();
final Location _targetLocation=entity.getLocation();
_targetLocation.setX(_targetLocation.getX() + (_rand.nextInt(400) - 200));
_targetLocation.setZ(_targetLocation.getZ() + (_rand.nextInt(Punish.MAXIMAL_RANDOM_TELEPORTATION_RANGE) - Punish.MAXIMAL_RANDOM_TELEPORTATION_RANGE / 2));
entity.teleport(_targetLocation);
break;
case ALL_POTION:
entity.addPotionEffect(new PotionEffect(PotionEffectType.BLINDNESS,Punish.TICKS_PER_SECOND * this.punishDuration,this.punishLevel),true);
entity.addPotionEffect(new PotionEffect(PotionEffectType.CONFUSION,Punish.TICKS_PER_SECOND * this.punishDuration,this.punishLevel),true);
entity.addPotionEffect(new PotionEffect(PotionEffectType.SLOW,Punish.TICKS_PER_SECOND * this.punishDuration,this.punishLevel),true);
entity.addPotionEffect(new PotionEffect(PotionEffectType.JUMP,Punish.TICKS_PER_SECOND * this.punishDuration,this.punishLevel),true);
break;
case FORCE:
final Vector _playerVector=this.getTargetBlock().getLocation().toVector();
final Vector _direction=entity.getLocation().toVector().clone();
_direction.subtract(_playerVector);
final double _length=_direction.length();
final double _stregth=(1 - (_length / v.getBrushSize())) * this.punishLevel;
_direction.normalize();
_direction.multiply(_stregth);
entity.setVelocity(_direction);
break;
case HYPNO:
if (entity instanceof Player) {
final Location _loc=entity.getLocation();
Location _target=_loc.clone();
for (int z=this.punishLevel; z >= -this.punishLevel; z--) {
for (int x=this.punishLevel; x >= -this.punishLevel; x--) {
for (int y=this.punishLevel; y >= -this.punishLevel; y--) {
_target.setX(_loc.getX() + x);
_target.setY(_loc.getY() + y);
_target.setZ(_loc.getZ() + z);
if (this.hypnoAffectLandscape && _target.getBlock().getType() == Material.AIR) {
continue;
}
_target=_loc.clone();
_target.add(x,y,z);
((Player)entity).sendBlockChange(_target,v.getVoxelId(),v.getData());
}
}
}
}
break;
default :
Bukkit.getLogger().warning("String_Node_Str");
break;
}
}

Fixed version (ground truth):
private void applyPunishment(final LivingEntity entity,final SnipeData v){
switch (this.punishment) {
case FIRE:
    entity.setFireTicks(Punish.TICKS_PER_SECOND * this.punishDuration);
  break;
case LIGHTNING:
entity.getWorld().strikeLightning(entity.getLocation());
break;
case BLINDNESS:
entity.addPotionEffect(new PotionEffect(PotionEffectType.BLINDNESS,Punish.TICKS_PER_SECOND * this.punishDuration,this.punishLevel),true);
break;
case DRUNK:
entity.addPotionEffect(new PotionEffect(PotionEffectType.CONFUSION,Punish.TICKS_PER_SECOND * this.punishDuration,this.punishLevel),true);
break;
case INVERT:
entity.addPotionEffect(new PotionEffect(PotionEffectType.SLOW,Punish.TICKS_PER_SECOND * this.punishDuration,this.punishLevel),true);
break;
case JUMP:
entity.addPotionEffect(new PotionEffect(PotionEffectType.JUMP,Punish.TICKS_PER_SECOND * this.punishDuration,this.punishLevel),true);
break;
case KILL:
entity.setHealth(0);
break;
case RANDOMTP:
final Random _rand=new Random();
final Location _targetLocation=entity.getLocation();
_targetLocation.setX(_targetLocation.getX() + (_rand.nextInt(400) - 200));
_targetLocation.setZ(_targetLocation.getZ() + (_rand.nextInt(Punish.MAXIMAL_RANDOM_TELEPORTATION_RANGE) - Punish.MAXIMAL_RANDOM_TELEPORTATION_RANGE / 2));
entity.teleport(_targetLocation);
break;
case ALL_POTION:
entity.addPotionEffect(new PotionEffect(PotionEffectType.BLINDNESS,Punish.TICKS_PER_SECOND * this.punishDuration,this.punishLevel),true);
entity.addPotionEffect(new PotionEffect(PotionEffectType.CONFUSION,Punish.TICKS_PER_SECOND * this.punishDuration,this.punishLevel),true);
entity.addPotionEffect(new PotionEffect(PotionEffectType.SLOW,Punish.TICKS_PER_SECOND * this.punishDuration,this.punishLevel),true);
entity.addPotionEffect(new PotionEffect(PotionEffectType.JUMP,Punish.TICKS_PER_SECOND * this.punishDuration,this.punishLevel),true);
break;
case FORCE:
final Vector _playerVector=this.getTargetBlock().getLocation().toVector();
final Vector _direction=entity.getLocation().toVector().clone();
_direction.subtract(_playerVector);
final double _length=_direction.length();
final double _stregth=(1 - (_length / v.getBrushSize())) * this.punishLevel;
_direction.normalize();
_direction.multiply(_stregth);
entity.setVelocity(_direction);
break;
case HYPNO:
if (entity instanceof Player) {
final Location _loc=entity.getLocation();
Location _target=_loc.clone();
for (int z=this.punishLevel; z >= -this.punishLevel; z--) {
for (int x=this.punishLevel; x >= -this.punishLevel; x--) {
for (int y=this.punishLevel; y >= -this.punishLevel; y--) {
_target.setX(_loc.getX() + x);
_target.setY(_loc.getY() + y);
_target.setZ(_loc.getZ() + z);
if (this.hypnoAffectLandscape && _target.getBlock().getType() == Material.AIR) {
continue;
}
_target=_loc.clone();
_target.add(x,y,z);
((Player)entity).sendBlockChange(_target,v.getVoxelId(),v.getData());
}
}
}
}
break;
default :
Bukkit.getLogger().warning("String_Node_Str");
break;
}
}