[Demonstration 1]

[Buggy Method]
@Override
public int read(char[] cbuf, int off, int len) throws IOException {
    int n = _in.read(cbuf, off, len);
    for (int i = off; i < (off + len); i++) {
        cbuf[i] = _decryption.decryptChar(cbuf[i]);
    }
    return n;
}

[Buggy Hunk]
for (int i = off; i < (off + len); i++) {

[Patch]
for (int i = off; i < len; i++) {

[Demonstration 2]

[Buggy Method]
private void buildTelegramConv(IncomingMessageRq messageRq, ConversationRecord convRecord) {
    FromDto from = messageRq.getOriginalRequest().getData().getMessage().getFrom();
    if (from == null)
        return;
    convRecord.setTgChatId(from.getId()).setSenderName(UserHelper.buildFullName(from.getFirstName(), from.getLastName()));
    String tgUrlGetPhotos = TG_URL_GET_USER_PHOTOS.replace(KEY_USER_ID, convRecord.getTgChatId());
    try {
        TgPhotosRs tgUserPhotos = retrofitClient.getTelegramController().getUserPhotos(tgUrlGetPhotos).execute().body();
        if (tgUserPhotos == null || tgUserPhotos.getResult().getTotalCount() == 0)
            return;
        String tgUserPhotoFileId = tgUserPhotos.getResult().getPhotos().get(0).stream().filter(it -> it.getHeight() == TG_PHOTO_MAX_SIZE).findFirst().get().getFileId();
        String tgUrlGetPhotoPath = TG_URL_GET_USER_PHOTO.replace(TG_FILE_ID, tgUserPhotoFileId);
        TgPhotosRs tgPhotoPath = retrofitClient.getTelegramController().getUserPhotoPath(tgUrlGetPhotoPath).execute().body();
        if (tgPhotoPath != null && tgPhotoPath.getResult() != null) {
            String photoUrl = TG_URL_PHOTO_PATH.replace(TG_FILE_PATH, tgPhotoPath.getResult().getFilePath());
            convRecord.setPhotoUrl(photoUrl);
        }
    } catch (IOException e) {
        e.printStackTrace();
    }
}

[Buggy Hunk]
.filter( it -> it.getHeight() == TG_PHOTO_MAX_SIZE)

[Patch]
.filter( it -> it.getHeight().intValue() == TG_PHOTO_MAX_SIZE)

[Demonstration 3]

[Buggy Method]
@Override
public int read(byte[] b) throws IOException {
    int c = super.read(b);
    if (c >= 0) {
        nRead_ += c;
    }
    return c;
}

[Buggy Hunk]
int c = super.read( b );

[Patch]
int c = in.read( b );