[Demonstration 1]

[Buggy Method]
@Override
public void run() {
    CloseableHttpResponse response = null;
    try {
        String requestURL = uri + "/$Resources/Topics?api-version=2013-07";
        HttpGet get = new HttpGet(requestURL);
        get.setHeader("Authorization", sasToken);
        response = httpClient.execute(get);
        StatusLine statusLine;
        if (response != null && (statusLine = response.getStatusLine()) != null && statusLine.getStatusCode() == 200) {
            String responseString = EntityUtils.toString(response.getEntity());
            logger.trace("Topic response from azure " + responseString);
            Feed topicsFeed = (Feed) xStream.fromXML(responseString);
            parseTopicResult(namespace, topicsFeed.listTopics(), excludeTopics, topicMetricsFromConfig);
        } else {
            if (response != null) {
                logger.error(String.format("The status line for the url [{}] is [{}] and the headers are [{}]", new Object[] { requestURL, response.getStatusLine(), response.getAllHeaders() }));
                HttpEntity entity = response.getEntity();
                if (entity != null) {
                    try {
                        logger.error(String.format("The contents are {}", EntityUtils.toString(response.getEntity())));
                    } catch (Exception var4) {
                        logger.error("", var4);
                    }
                } else {
                    logger.error("The response content is null");
                }
            } else {
                logger.error(String.format("The response is null for the URL {}", requestURL));
            }
        }
    } catch (Exception se) {
        logger.error("Unexpected error while trying to get the topics", se);
    } finally {
        if (response != null) {
            try {
                response.close();
            } catch (IOException e) {
                logger.debug("Error closing the response ", e);
            }
        }
    }
}

[Buggy Hunk]
parseTopicResult(namespace, topicsFeed.listTopics(), excludeTopics, topicMetricsFromConfig);

[Patch]
parseTopicResult(namespace, topicsFeed.listTopics(), includeTopics, excludeTopics, topicMetricsFromConfig);

[Demonstration 2]

[Buggy Method]
protected void abort(Event event) {
    DocumentEventContext ctx = (DocumentEventContext) event.getContext();
    DocumentModel doc = ctx.getSourceDocument();
    LOG.warn(doc.getPathAsString() + " does not comply");
    event.markBubbleException();
    event.markRollBack();
    throw new NuxeoException(ExceptionHelper.unwrapException(new RecoverableClientException("Bubbling exception by " + AbortDocumentCreationListener.class.getName(), message, null)));
}

[Buggy Hunk]
throw new NuxeoException(ExceptionHelper.unwrapException(new RecoverableClientException("Bubbling exception by " + AbortDocumentCreationListener.class.getName(), message, null)));

[Patch]
throw new NuxeoException(ExceptionHelper.unwrapException(new RecoverableClientException("Bubbling exception by " + AbortDocumentCreationListener.class.getName(), getMessage(), null)));

[Demonstration 3]

[Buggy Method]
public boolean runIfAlpha(Runnable r, String lockName) {
    Preconditions.checkArgument(!Strings.isNullOrEmpty(lockName), "lockName is not optionnal");
    String mutexPath = getLockPath(lockName);
    InterProcessSemaphoreMutex mutex = new InterProcessSemaphoreMutex(client, mutexPath);
    try {
        if (mutex.acquire(0, TimeUnit.MILLISECONDS)) {
            logger.debug("mutex acquired, saving timestamp");
            try {
                try {
                    client.setData().forPath(mutexPath, Longs.toByteArray(LocalDateTime.now(ZoneId.systemDefault()).toEpochSecond(ZoneOffset.UTC)));
                } catch (Exception e) {
                    logger.debug("Error writing last run time in parent node", e);
                }
                r.run();
                return true;
            } finally {
                mutex.release();
                logger.debug("mutex released");
            }
        } else {
            logger.debug("mutex NOT acquired");
        }
    } catch (Exception e) {
        logger.error("Error", e);
    }
    return false;
}

[Buggy Hunk]
logger.error("Error",e);

[Patch]
logger.debug("Error",e);