[Demonstration 1]

[Buggy Method]
private void smeltOre(BlockPos pos) {
    ItemStack itemstack = FurnaceRecipes.instance().getSmeltingResult(new ItemStack(worldObj.getBlockState(pos).getBlock()));
    if (itemstack != null && !(worldObj.isRemote)) {
        worldObj.setBlockToAir(pos);
        worldObj.spawnEntityInWorld(new EntityItem(worldObj, getPos().getX() + 0.5, getPos().getY() + 1.5, getPos().getZ() + 0.5, itemstack));
    }
}

[Buggy Hunk]
worldObj.spawnEntityInWorld(new EntityItem(worldObj, getPos().getX()+0.5, getPos().getY()+1.5, getPos().getZ()+0.5, itemstack));

[Patch]
worldObj.spawnEntityInWorld(new EntityItem(worldObj, getPos().getX()+0.5, getPos().getY()+1.5, getPos().getZ()+0.5, itemstack.copy()));

[Demonstration 2]

[Buggy Method]
public boolean scheduleWaitlistedAppointment(Appointment a, Date start, Date end) throws ParseException {
    DatabaseConnection db = DatabaseConnection.getInstance();
    MongoCollection<Document> aptCollection = db.mongodb.getCollection("Appointment");
    DateTimeParser dtp = new DateTimeParser();
    //        Date startDate = dtp.parseDate(a.getStart());
    //        Date endDate = dtp.parseDate(a.getEnd());
    // check for overlapping appointments
    List<Appointment> apts = lookupAppointment(a.getDoctor(), a.getPatient(), a.getStart(), a.getEnd());
    if (apts.size() > 0) {
        return false;
    }
    Document newDoc = new Document();
    newDoc.append("doc_id", a.getDoctor().getId());
    newDoc.append("pat_id", a.getDoctor().getId());
    newDoc.append("start", start);
    newDoc.append("end", end);
    aptCollection.insertOne(newDoc);
    return true;
}

[Buggy Hunk]
a.getDoctor(), a.getPatient(), a.getStart(), a.getEnd());

[Patch]
a.getDoctor(), a.getPatient(), start, end);

[Demonstration 3]

[Buggy Method]
double heuristics(State a, State b) {
    double temp;
    double min = Math.abs(a.getX() - b.getX());
    double max = Math.abs(a.getY() - a.getY());
    if (min > max) {
        temp = min;
        min = max;
        max = temp;
    }
    return ((m_sqrt2 - 1.0) * min + max);
}

[Buggy Hunk]
double max = Math.abs(a.getY() - a.getY());

[Patch]
double max = Math.abs(a.getY() - b.getY());