[Demonstration 1]

[Buggy Method]
public String getDisplayAverageTimeInMs() {
    return String.format("%.4f", getAverageTimeInMs());
}

[Buggy Hunk]
return String.format("%.4f", getAverageTimeInMs());

[Patch]
return String.format("%.4f", getAverageTimeInMs()).replaceAll(",",".");

[Demonstration 2]

[Buggy Method]
public Mono<Void> mapRoute(CloudFoundryOperations cfOperations, CfProperties cfProperties) {
    LOGGER.lifecycle("Mapping hostname '{}' in domain '{}' with path '{}' of app '{}'", cfProperties.hostName(), cfProperties.domain(), cfProperties.path(), cfProperties.name());
    Mono<Void> resp = cfOperations.routes().map(MapRouteRequest.builder().applicationName(cfProperties.name()).domain(cfProperties.domain()).host(cfProperties.hostName()).path(cfProperties.path()).build());
    return resp;
}

[Buggy Hunk]
.path(cfProperties.path()).build());

[Patch]
.path(cfProperties.path()).build()).then();

[Demonstration 3]

[Buggy Method]
protected Long getLongReqParam(String key, Long defaultValue) {
    HttpServletRequest request = ((ServletRequestAttributes) RequestContextHolder.getRequestAttributes()).getRequest();
    try {
        return Long.valueOf(request.getParameter(key));
    } catch (Exception e) {
        logger.error(MessageFormat.format("get {0} error, use default value: {1}, exception details: ", e));
        return defaultValue;
    }
}

[Buggy Hunk]
logger.error(MessageFormat.format("get {0} error, use default value: {1}, exception details: ", e));

[Patch]
logger.error(MessageFormat.format("get {0} error, use default value: {1}, exception details: {2}", key, defaultValue, e));