[Demonstration 1]

[Buggy Method]
private void load(final Path path) throws IOException {
    JsonNode root = new ObjectMapper().readTree(path.resolve("tile_config.json").toFile());
    log.debug("TileSet Size: " + root.get("tile_info").get(0));
    tileSize = root.get("tile_info").get(0).get("width").asInt();
    Path tileImagePath = null;
    JsonNode tiles;
    if (root.has("tiles-new")) {
        tiles = root.get("tiles-new").get(0).get("tiles");
        if (root.get("tiles-new").get(0).has("file")) {
            tileImagePath = Paths.get(root.get("tiles-new").get(0).get("file").asText());
        }
    } else {
        tiles = root.get("tiles");
    }
    if (tileImagePath == null) {
        Optional<Path> potentialPath = Files.find(path, 1, (path1, basicFileAttributes) -> path1.getFileName().toString().endsWith(".png")).findFirst();
        if (potentialPath.isPresent()) {
            tileImagePath = potentialPath.get();
        } else {
            throw new IOException("Could not find tileset image for tileset '" + path + "'.");
        }
    }
    try {
        texture = ImageIO.read(tileImagePath.toFile());
    } catch (IOException e) {
        log.error("Error while attempting to read tileset image '" + tileImagePath.toString() + "':", e);
    }
    tiles.forEach(tileDef -> {
        TileConfiguration tileConfiguration = new TileConfiguration(tileDef.get("id").asText());
        int foreground = -1;
        int background = -1;
        if (tileDef.has("fg")) {
            foreground = tileDef.get("fg").asInt();
        }
        if (tileDef.has("bg")) {
            background = tileDef.get("bg").asInt();
        }
        if (tileDef.has("rotates")) {
            tileConfiguration.rotates = tileDef.get("rotates").asBoolean();
        }
        createTileImage(tileConfiguration.getID(), foreground, background);
        if (tileDef.has("multitile") && tileDef.get("multitile").asBoolean()) {
            tileDef.get("additional_tiles").forEach(additionalTileDef -> {
                TileConfiguration additionalTileConfiguration = new TileConfiguration(tileConfiguration.getID() + ">>" + additionalTileDef.get("id").asText());
                int foregroundID = -1;
                int backgroundID = -1;
                if (additionalTileDef.has("fg")) {
                    foregroundID = additionalTileDef.get("fg").asInt();
                }
                if (additionalTileDef.has("bg")) {
                    backgroundID = additionalTileDef.get("bg").asInt();
                }
                if (additionalTileDef.has("rotates")) {
                    additionalTileConfiguration.rotates = additionalTileDef.get("rotates").asBoolean();
                }
                createTileImage(additionalTileConfiguration.getID(), foregroundID, backgroundID);
                tileConfiguration.addMultiTile(additionalTileConfiguration, TileConfiguration.AdditionalTileType.valueOf(additionalTileDef.get("id").asText().toUpperCase()));
            });
        }
        TileConfiguration.tiles.put(tileDef.get("id").asText(), tileConfiguration);
    });
    eventBus.post(new TilesetLoadedEvent(this));
}

[Buggy Hunk]
tileImagePath = Paths.get(root.get("tiles-new").get(0).get("file").asText());

[Patch]
tileImagePath = ApplicationSettings.getInstance().getPath(ApplicationSettings.Preference.GAME_FOLDER).resolve(Paths.get(root.get("tiles-new").get(0).get("file").asText()));

[Demonstration 2]

[Buggy Method]
public void aside(final AsideRequest request) {
    PlaceholderMap placeholders = request.getLayout();
    StackDockPerspective stack = new StackDockPerspective();
    if (placeholders != null) {
        stack.setPlaceholders(placeholders);
    }
    if (stack.getItemCount() == 0) {
        insert(stack, request.getLocation());
    }
    int index = indexOf(stack, request.getLocation());
    if (index == -1) {
        index = stack.getDockableCount();
        if (index == 0) {
            index = 1;
        }
    } else {
        index++;
    }
    index = Math.min(stack.getItemCount(), index);
    if (request.getPlaceholder() != null) {
        stack.insertPlaceholder(index, request.getPlaceholder(), Level.BASE);
    }
    request.answer(new StackDockProperty(index, request.getPlaceholder()), stack.getPlaceholders());
}

[Buggy Hunk]
if( placeholders != null ){

[Patch]
if( placeholders != null && stack.canRead( placeholders ) ){

[Demonstration 3]

[Buggy Method]
public synchronized String getFullness(String zID) {
    return zoneMap.get(zID).getFullness();
}

[Buggy Hunk]
public synchronized String getFullness(String zID) {

[Patch]
public String getFullness(String zID) {