[Demonstration 1]

[Buggy Method]
private void invalidate() {
    Faction uniqueFaction = solarSystem.getUniqueOwner();
    Color backColor = uniqueFaction == null ? DEFAULT_COLOR : uniqueFaction.getColor();
    planetCircle.setFill(backColor);
    if (isSelected) {
        planetCircle.setStroke(SELECTED_COLOR);
    } else if (isHovered) {
        planetCircle.setStroke(HOVER_COLOR);
    } else {
        planetCircle.setStroke(DEFAULT_COLOR);
    }
}

[Buggy Hunk]
private void invalidate() {

[Patch]
public void invalidate() {

[Demonstration 2]

[Buggy Method]
public Item[] toArray() {
    return Arrays.copyOf(items, size);
}

[Buggy Hunk]
public Item[] toArray() {

[Patch]
private Item[] toArray() {

[Demonstration 3]

[Buggy Method]
private void logout(final HttpServletRequest req, final HttpServletResponse resp) throws IOException {
    Optional.ofNullable(req.getSession(false)).ifPresent((httpSession) -> {
        try {
            httpSession.invalidate();
        } catch (IllegalStateException e) {
            logService.log(LogService.LOG_DEBUG, e.getMessage(), e);
        }
    });
    String reqLoggedOutUrl = req.getParameter(reqParamNameLoggedOutUrl);
    if (reqLoggedOutUrl != null) {
        resp.sendRedirect(URLEncoder.encode(reqLoggedOutUrl, "UTF-8"));
    } else {
        resp.sendRedirect(loggedOutUrl);
    }
}

[Buggy Hunk]
resp.sendRedirect(URLEncoder.encode(reqLoggedOutUrl, "UTF-8"));

[Patch]
resp.sendRedirect(URLEncoder.encode(reqLoggedOutUrl, StandardCharsets.UTF_8.displayName()));