[Demonstration 1]

[Buggy Method]
public void decryptWithPassword(InputStream inputStream, OutputStream outputStream, Password password) {
    try (VirgilStreamDataSource dataSource = new VirgilStreamDataSource(inputStream);
        VirgilStreamDataSink dataSink = new VirgilStreamDataSink(outputStream)) {
        cipher.decryptWithPassword(dataSource, dataSink, password.getEncoded());
    } catch (IOException e) {
        LOGGER.log(Level.SEVERE, "Can't close resource", e);
    }
}

[Buggy Hunk]
cipher.decryptWithPassword(dataSource, dataSink, password.getEncoded());

[Patch]
((VirgilStreamCipher) cipher).decryptWithPassword(dataSource, dataSink, password.getEncoded());

[Demonstration 2]

[Buggy Method]
@Override
public void exceptionCaught(ChannelHandlerContext ctx, Throwable cause) throws Exception {
    log.log(Level.WARNING, cause.getMessage());
    ctx.close();
}

[Buggy Hunk]
log.log(Level.WARNING, cause.getMessage());

[Patch]
log.log(Level.WARNING, cause.getMessage(), cause);

[Demonstration 3]

[Buggy Method]
private void dispatchConnectivityChange() {
    if (onConnectivityChangedListener != null) {
        onConnectivityChangedListener.onConectivityChanged(isInternetAvailable());
    }
}

[Buggy Hunk]
onConnectivityChangedListener.onConectivityChanged(isInternetAvailable());

[Patch]
onConnectivityChangedListener.onConnectivityChanged(isInternetAvailable());