[Demonstration 1]

[Buggy Method]
@Override
public void onFailure(Method method, Throwable exception) {
    GWT.log("Erro: " + exception, exception);
}

[Buggy Hunk]
GWT.log("Erro: " + exception, exception);

[Patch]
callback.onFailure(method, exception);

[Demonstration 2]

[Buggy Method]
@Override
public void onReceive(Object message) throws Exception {
    log.info("Player {} received the message {}, from {}", getSelf().path().name(), message, getSender().path().name());
    if (message instanceof MessagePlaceBet) {
        placeBet();
    } else if (message instanceof MessagePlayTurn) {
        playTurn();
    } else if (message instanceof MessageGrabWin) {
        grabWin();
    } else {
        unhandled(message);
    }
}

[Buggy Hunk]
log.info("Player {} received the message {}, from {}", getSelf().path().name(), message, getSender().path().name());

[Patch]
log.debug("Player {} received the message {}, from {}", getSelf().path().name(), message, getSender().path().name());

[Demonstration 3]

[Buggy Method]
protected Socket newSocket(String host, int port) throws RemoteException {
    Socket toReturn = null;
    int retryCount = 0;
    Exception lastException = null;
    do {
        log.debug("Attempting client socket connection to %s:%s (retry attempt: %s)", host, port, retryCount + 1);
        try {
            Socket tmp = newSocketAsync(host, port);
            toReturn = tmp;
            log.debug("Connection established to %s:%s", host, port);
        } catch (Exception e) {
            log.warning("Error attempting to connect to %s:%s. Retry count currently is: %s. Max retries set to: %s", e, retryCount, connectionMaxRetry);
            lastException = e;
        }
        retryCount++;
    } while (toReturn == null && retryCount < connectionMaxRetry);
    if (lastException != null) {
        if (lastException instanceof RemoteException) {
            throw (RemoteException) lastException;
        }
        throw new RemoteException(String.format("Could not establish client connection to %s:%s (retried %s times)", host, port, retryCount), lastException);
    }
    if (toReturn == null) {
        throw new RemoteException("Bad state: client socket is null");
    }
    log.debug("Connection to %s:%s succeeded", host, port);
    return toReturn;
}

[Buggy Hunk]
log.warning("Error attempting to connect to %s:%s. Retry count currently is: %s. Max retries set to: %s", e, retryCount, connectionMaxRetry);

[Patch]
log.warning("Error attempting to connect to %s:%s. Retry count currently is: %s. Max retries set to: %s", host, port, retryCount, connectionMaxRetry);