[Demonstration 1]

[Buggy Method]
static ApportionmentInstance exponentialRandomInstance(SedgewickRandom random, int n) {
    final double[] population = new double[n];
    for (int i = 0; i < population.length; i++) {
        population[i] = 1 + random.exp(10);
    }
    final int k = random.uniform(n, 10 * n);
    return new ApportionmentInstance(population, k);
}

[Buggy Hunk]
final int k = random.uniform(n, 10 * n);

[Patch]
final int k = random.uniform(5* n, 10 * n);

[Demonstration 2]

[Buggy Method]
@Override
public void setRightMotors(double power) {
    this.setRightMotors(power);
}

[Buggy Hunk]
this.setRightMotors(power);

[Patch]
this.rightMotor.setPower(power);

[Demonstration 3]

[Buggy Method]
@EventHandler(priority = EventPriority.NORMAL, ignoreCancelled = true)
public void setDamageMulti(EntityDamageByEntityEvent event) {
    // We are only interested in these three damage types
    if (event.getCause() != DamageCause.ENTITY_ATTACK && event.getCause() != DamageCause.PROJECTILE && event.getCause() != DamageCause.ENTITY_EXPLOSION)
        return;
    // Get the entity which dealt the damage
    LivingEntity damager = null;
    if (event.getDamager() instanceof Projectile) {
        Projectile entity = (Projectile) event.getDamager();
        if (entity.getShooter() instanceof LivingEntity)
            ;
        damager = (LivingEntity) entity.getShooter();
    } else if (event.getDamager() instanceof LivingEntity) {
        damager = (LivingEntity) event.getDamager();
    }
    if (damager == null)
        return;
    // Fetch the multiplier for damage caused by the mob
    float multi = DamageAbility.getMetaValue(damager);
    // If the multiplier is 1.0F we don't do anything
    if (multi != 1.0F) {
        if (!P.p().getPluginIntegration().canApplyAbilities(damager))
            return;
        // Calculate the new damage
        double newDamage = event.getDamage() * multi;
        // Set the new damage
        event.setDamage(newDamage);
    }
}

[Buggy Hunk]
if (entity.getShooter() instanceof LivingEntity);

[Patch]
if (entity.getShooter() instanceof LivingEntity)