[Demonstration 1]

[Buggy Method]
@Override
public void startVideoTimeCountingThread(VideoDuration video) {
    final double dbCurrTime = Double.parseDouble(dao.findVideoById(Integer.parseInt(video.getVideoId())).getCurrTime());
    final int videoId = Integer.parseInt(video.getVideoId());
    final double duration = video.getDuration();
    Future<?> future = scheduledService.scheduleAtFixedRate(new Runnable() {

        double startTime = System.nanoTime() / 1000000000.0;

        double endTime = duration;

        @Override
        public void run() {
            double currTime = System.nanoTime() / 1000000000.0 - startTime + dbCurrTime;
            if (currTime <= endTime) {
                System.out.println("Current time - " + (currTime));
                dao.updateVideoTime(videoId, Double.toString(currTime));
            } else {
                System.out.println("Ended - time is " + currTime + " ; duration is " + duration);
                throw new RuntimeException();
            }
        }
    }, 0, 1, TimeUnit.SECONDS);
    countThreadFutureList.add(new FutureHolder(future, video.getRoomId(), video.getVideoId()));
}

[Buggy Hunk]
dao.updateVideoTime(videoId, Double.toString(currTime));

[Patch]
dao.updateVideoTime(videoId, Double.toString(new BigDecimal(currTime).setScale(4, RoundingMode.HALF_UP).doubleValue()));

[Demonstration 2]

[Buggy Method]
public void stop() {
    this.endTime = System.currentTimeMillis() - startTime;
    this.isRunning = true;
    this.isStopped = true;
}

[Buggy Hunk]
this.endTime = System.currentTimeMillis() - startTime;

[Patch]
this.elapsedTime = System.currentTimeMillis() - startTime;

[Demonstration 3]

[Buggy Method]
public static void ageItem(Item item, int ticksToAge) {
    try {
        Class<?> itemClass = getBukkitClass("net.minecraft.server.EntityItem");
        Object handle = getHandle(item);
        Field ageField = itemClass.getDeclaredField("age");
        ageField.setAccessible(true);
        ageField.set(handle, ticksToAge);
    } catch (Exception ex) {
        ex.printStackTrace();
    }
}

[Buggy Hunk]
Class<?> itemClass = getBukkitClass("net.minecraft.server.EntityItem");

[Patch]
Class<?> itemClass = fixBukkitClass("net.minecraft.server.EntityItem");