[Demonstration 1]

[Buggy Method]
private static String getParams(WinLauncherConfig config) {
    StringBuilder params = new StringBuilder();
    if (config.isDebug())
        params.append(" debug");
    if (config.isDebug())
        params.append(" nochangedir");
    return params.toString();
}

[Buggy Hunk]
if (config.isDebug())

[Patch]
if (config.isNoChangeDir())

[Demonstration 2]

[Buggy Method]
@EventHandler
public void onItemInteract(PlayerInteractEvent event) {
    // will detect if the player is using an axe so the points of a portal can be set
    // also any other detections such as sign interaction or basic block protection
    Player player = event.getPlayer();
    if (player.hasMetadata("selectingPortal") && (event.getAction() == Action.LEFT_CLICK_BLOCK || event.getAction() == Action.RIGHT_CLICK_BLOCK)) {
        for (AdvancedPortal portal : Portal.Portals) {
            if (Portal.locationInPortal(portal, event.getClickedBlock().getLocation(), 0)) {
                player.sendMessage(PluginMessages.customPrefixFail + "\u00A7a You have selected: \u00A7e" + portal.portalName);
                // adds the name to the metadata of the character
                player.setMetadata("selectedPortal", new FixedMetadataValue(plugin, portal.portalName));
                event.setCancelled(true);
                player.removeMetadata("selectingPortal", plugin);
                return;
            }
        }
        player.sendMessage(PluginMessages.customPrefixFail + "\u00A7c No portal was selected. If you would like to stop selecting please type \u00A7e/portal select \u00A7cagain!");
        event.setCancelled(true);
        return;
    }
    if (player.hasPermission("AdvancedPortals.CreatePortal")) {
        // UseOnlyServerMadeAxe being set to true makes is so only the axe generated by the server can be used so other iron axes can be used normally,
        //  by default its false but it is a nice feature in case the user wants to use the axe normally too, such as a admin playing survival or it being used
        //  as a weapon.
        // Null pointer exeption detected here on some servers(try decompiling the jar file to double check)
        /*try {
				// Use this to surround the code if needed
			}
			catch(NullPointerException e){

			}*/
        if (// was type id
        event.getItem() != null && event.getPlayer().getItemInHand().getType() == WandMaterial && (!UseOnlyServerAxe || (event.getItem().getItemMeta().getDisplayName() != null && event.getItem().getItemMeta().getDisplayName().equals("\u00A7ePortal Region Selector")))) {
            // This checks if the action was a left or right click and if it was directly effecting a block.
            if (event.getAction() == Action.LEFT_CLICK_BLOCK) {
                Location blockloc = event.getClickedBlock().getLocation();
                // stores the selection as metadata on the character so then it isn't saved anywhere, if the player logs out it will
                //  have to be selected again if the player joins, also it does not affect any other players.
                player.setMetadata("Pos1X", new FixedMetadataValue(plugin, blockloc.getBlockX()));
                player.setMetadata("Pos1Y", new FixedMetadataValue(plugin, blockloc.getBlockY()));
                player.setMetadata("Pos1Z", new FixedMetadataValue(plugin, blockloc.getBlockZ()));
                player.setMetadata("Pos1World", new FixedMetadataValue(plugin, blockloc.getWorld().getName()));
                player.sendMessage("\u00A7eYou have selected pos1! X:" + blockloc.getBlockX() + " Y:" + blockloc.getBlockY() + " Z:" + blockloc.getBlockZ() + " World: " + blockloc.getWorld().getName());
                // Stops the event so the block is not damaged
                event.setCancelled(true);
                // Returns the event so no more code is executed(stops unnecessary code being executed)
            } else if (event.getAction() == Action.RIGHT_CLICK_BLOCK) {
                Location blockloc = event.getClickedBlock().getLocation();
                player.setMetadata("Pos2X", new FixedMetadataValue(plugin, blockloc.getBlockX()));
                player.setMetadata("Pos2Y", new FixedMetadataValue(plugin, blockloc.getBlockY()));
                player.setMetadata("Pos2Z", new FixedMetadataValue(plugin, blockloc.getBlockZ()));
                player.setMetadata("Pos2World", new FixedMetadataValue(plugin, blockloc.getWorld().getName()));
                player.sendMessage("\u00A7eYou have selected pos2! X:" + blockloc.getBlockX() + " Y:" + blockloc.getBlockY() + " Z:" + blockloc.getBlockZ() + " World: " + blockloc.getWorld().getName());
                // Stops the event so the block is not interacted with
                event.setCancelled(true);
                // Returns the event so no more code is executed(stops unnecessary code being executed)
            }
        }
    }
}

[Buggy Hunk]
player.sendMessage(PluginMessages.customPrefixFail + "\u00A7a You have selected: \u00A7e" + portal.portalName);

[Patch]
player.sendMessage(PluginMessages.customPrefix + "\u00A7a You have selected: \u00A7e" + portal.portalName);

[Demonstration 3]

[Buggy Method]
@Override
public void moveWatchedVideo() {
    /// 폴더의 최대 크기
    long maximumSizeOfEntireVideo = MAX_ENTIRE_VIDEO * FileUtils.ONE_GB;
    // 한번에 옮길 비디오 개수
    int maximumCountOfMoveVideo = 5;
    // 옮긴 비디오 개수
    int countOfMoveVideo = 0;
    // Watched 폴더
    File mainBaseFile = new File(STORAGE_PATHS[0]);
    // Watched 폴더 크기
    long usedSpace = FileUtils.sizeOfDirectory(mainBaseFile);
    // 여유 공간
    long freeSpace = mainBaseFile.getFreeSpace();
    log.info("    MOVE WATCHED VIDEO START :: Watched {} GB, free {} GB", usedSpace / FileUtils.ONE_GB, freeSpace / FileUtils.ONE_GB);
    // 전체 비디오중에서
    for (Video video : getVideoListSortByScore()) {
        // 드라이드에 남은 공간이 최소 공간보다 작으면 break
        if (freeSpace < MIN_FREE_SPAC) {
            log.info("      Not enough space. {} < {}", freeSpace / FileUtils.ONE_GB, MIN_FREE_SPAC / FileUtils.ONE_GB);
            break;
        }
        // Watched 폴더 크기가 최대 크기보다 커졌으면 break
        if (usedSpace > maximumSizeOfEntireVideo) {
            log.info("      Exceed the maximum size. {}  > {}", usedSpace / FileUtils.ONE_GB, maximumSizeOfEntireVideo / FileUtils.ONE_GB);
            break;
        }
        // 플레이 한적이 없는 비디오는 pass
        if (video.getPlayCount() < 1)
            continue;
        // Watched 폴더에 있는 파일도 pass
        if (video.getDelegatePath().contains(mainBaseFile.getAbsolutePath()))
            continue;
        // 스튜디오 이름으로 폴더를 준비
        File destDir = new File(mainBaseFile, video.getStudio().getName());
        if (!destDir.exists())
            destDir.mkdir();
        // 비디오를 옮긴다
        countOfMoveVideo++;
        log.info("    move {} to {}", video.getTitle(), destDir.getPath());
        videoDao.moveVideo(video.getOpus(), destDir.getAbsolutePath());
        // 다 옮겼으면 break
        if (countOfMoveVideo == maximumCountOfMoveVideo) {
            log.info("      Completed {} videos.", maximumCountOfMoveVideo);
            break;
        } else {
            // 잠시 쉰다.
            try {
                Thread.sleep(SLEEP_TIME);
            } catch (InterruptedException e) {
                log.error("sleep error", e);
            }
        }
        // 공간을 다시 젠다
        usedSpace = FileUtils.sizeOfDirectory(mainBaseFile);
        freeSpace = mainBaseFile.getFreeSpace();
    }
    usedSpace = FileUtils.sizeOfDirectory(mainBaseFile);
    freeSpace = mainBaseFile.getFreeSpace();
    log.info("    MOVE WATCHED VIDEO END :: Watched {} GB, free {} GB", usedSpace / FileUtils.ONE_GB, freeSpace / FileUtils.ONE_GB);
}

[Buggy Hunk]
log.info("    move {} to {}", video.getTitle(), destDir.getPath());

[Patch]
log.info("    {} move from [{}] to [{}]", video.getFullname(), video.getDelegatePathFile().getParent(), destDir.getPath());