[Demonstration 1]

[Buggy Method]
private static void decrypt(String path, String password) {
    byte[] fileBytes = new byte[0];
    try {
        File file = new File(path);
        fileBytes = new byte[(int) file.length()];
        FileInputStream inputStream = new FileInputStream(file);
        final int bytesRead = inputStream.read(fileBytes);
        inputStream.close();
    } catch (FileNotFoundException e) {
        e.printStackTrace();
    } catch (IOException e) {
        e.printStackTrace();
    }
    byte[] passwordBytes = password.getBytes();
    byte[] iv = Arrays.copyOfRange(fileBytes, 0, 32);
    byte[] data = Arrays.copyOfRange(fileBytes, 32, fileBytes.length - 32);
    final byte[] decrypted = Magnum.decrypt(iv, passwordBytes, data);
    try {
        FileOutputStream outputStream = new FileOutputStream(path + ".dec");
        outputStream.write(decrypted);
        outputStream.flush();
        outputStream.close();
    } catch (FileNotFoundException e) {
        e.printStackTrace();
    } catch (IOException e) {
        e.printStackTrace();
    }
}

[Buggy Hunk]
byte[] data = Arrays.copyOfRange(fileBytes, 32, fileBytes.length - 32);

[Patch]
byte[] data = Arrays.copyOfRange(fileBytes, 32, fileBytes.length);

[Demonstration 2]

[Buggy Method]
private void addEvent() {
    mProgress.setMessage("Submitting Event...");
    final String theTitle = eventTitle.getText().toString().trim();
    final String theDescription = eventDescription.getText().toString().trim();
    final String theTopic = "userSubmitted";
    final String theLat = lat;
    final String theLng = lng;
    final String theStartDateTime = dateTimeText.getText().toString().trim();
    Log.d("thestartDateTimeis", theStartDateTime);
    final Boolean theNotified = notified;
    final String theVoteCt = voteCt;
    if (!TextUtils.isEmpty(theTitle) && !TextUtils.isEmpty(theDescription) && !TextUtils.isEmpty(theTopic) && !TextUtils.isEmpty(theLat) && !TextUtils.isEmpty(theLng) && !TextUtils.isEmpty(theStartDateTime)) {
        mProgress.show();
        DatabaseReference submitEvent = mDatabase.push();
        submitEvent.child("description").setValue(theDescription);
        submitEvent.child("lat").setValue(theLat);
        submitEvent.child("lng").setValue(theLng);
        submitEvent.child("notified").setValue(theNotified);
        submitEvent.child("startDateTime").setValue(theStartDateTime);
        submitEvent.child("topic").setValue(theTopic);
        submitEvent.child("title").setValue(theTitle);
        submitEvent.child("voteCt").setValue(theVoteCt);
        mProgress.dismiss();
        //Made a toast because event would be posted too quick to display a progress dialog
        Toast.makeText(this, "Event was submited!", Toast.LENGTH_LONG).show();
        Intent postCreation = new Intent(EventCreateActivity.this, HomeLandingPage.class);
        startActivity(postCreation);
    } else {
        Toast.makeText(this, "Please fill out every field", Toast.LENGTH_LONG).show();
    }
}

[Buggy Hunk]
if(!TextUtils.isEmpty(theTitle) && !TextUtils.isEmpty(theDescription) && !TextUtils.isEmpty(theTopic) && !TextUtils.isEmpty(theLat) && !TextUtils.isEmpty(theLng) && !TextUtils.isEmpty(theStartDateTime)){

[Patch]
if(!TextUtils.isEmpty(theTitle) && !TextUtils.isEmpty(theDescription) && !TextUtils.isEmpty(theTopic) && !TextUtils.isEmpty(theLat) && !TextUtils.isEmpty(theLng) && theStartDateTime.compareTo("...")!=0){

[Demonstration 3]

[Buggy Method]
public Message sendVoice(SendVoice sendVoice) throws TelegramApiException {
    String responseContent;
    try {
        String url = getBaseUrl() + SendVoice.PATH;
        HttpPost httppost = new HttpPost(url);
        httppost.setConfig(requestConfig);
        if (sendVoice.isNewVoice()) {
            MultipartEntityBuilder builder = MultipartEntityBuilder.create();
            builder.addTextBody(SendVoice.CHATID_FIELD, sendVoice.getChatId());
            builder.addBinaryBody(SendVoice.AUDIO_FIELD, new java.io.File(sendVoice.getAudio()), ContentType.create("audio/ogg"), sendVoice.getVoiceName());
            if (sendVoice.getReplayMarkup() != null) {
                builder.addTextBody(SendVoice.REPLYMARKUP_FIELD, sendVoice.getReplayMarkup().toJson().toString());
            }
            if (sendVoice.getReplayToMessageId() != null) {
                builder.addTextBody(SendVoice.REPLYTOMESSAGEID_FIELD, sendVoice.getReplayToMessageId().toString());
            }
            if (sendVoice.getDisableNotification() != null) {
                builder.addTextBody(SendVoice.DISABLENOTIFICATION_FIELD, sendVoice.getDisableNotification().toString());
            }
            if (sendVoice.getDuration() != null) {
                builder.addTextBody(SendVoice.DURATION_FIELD, sendVoice.getDuration().toString());
            }
            HttpEntity multipart = builder.build();
            httppost.setEntity(multipart);
        } else {
            List<NameValuePair> nameValuePairs = new ArrayList<>();
            nameValuePairs.add(new BasicNameValuePair(SendVoice.CHATID_FIELD, sendVoice.getChatId()));
            nameValuePairs.add(new BasicNameValuePair(SendVoice.AUDIO_FIELD, sendVoice.getAudio()));
            if (sendVoice.getReplayMarkup() != null) {
                nameValuePairs.add(new BasicNameValuePair(SendVoice.REPLYMARKUP_FIELD, sendVoice.getReplayMarkup().toJson().toString()));
            }
            if (sendVoice.getReplayToMessageId() != null) {
                nameValuePairs.add(new BasicNameValuePair(SendVoice.REPLYTOMESSAGEID_FIELD, sendVoice.getReplayToMessageId().toString()));
            }
            if (sendVoice.getDisableNotification() != null) {
                nameValuePairs.add(new BasicNameValuePair(SendVoice.DISABLENOTIFICATION_FIELD, sendVoice.getDisableNotification().toString()));
            }
            if (sendVoice.getDuration() != null) {
                nameValuePairs.add(new BasicNameValuePair(SendVoice.DURATION_FIELD, sendVoice.getDuration().toString()));
            }
            httppost.setEntity(new UrlEncodedFormEntity(nameValuePairs, StandardCharsets.UTF_8));
        }
        try (CloseableHttpResponse response = httpclient.execute(httppost)) {
            HttpEntity ht = response.getEntity();
            BufferedHttpEntity buf = new BufferedHttpEntity(ht);
            responseContent = EntityUtils.toString(buf, StandardCharsets.UTF_8);
        }
    } catch (IOException e) {
        throw new TelegramApiException("Unable to send sticker", e);
    }
    JSONObject jsonObject = new JSONObject(responseContent);
    if (!jsonObject.getBoolean(Constants.RESPONSEFIELDOK)) {
        throw new TelegramApiException("Error at sendVoice", jsonObject.getString(ERRORDESCRIPTIONFIELD), jsonObject.getInt(ERRORCODEFIELD));
    }
    return new Message(jsonObject.getJSONObject(Constants.RESPONSEFIELDRESULT));
}

[Buggy Hunk]
builder.addTextBody(SendVoice.REPLYMARKUP_FIELD, sendVoice.getReplayMarkup().toJson().toString());

[Patch]
builder.addTextBody(SendVoice.REPLYMARKUP_FIELD, sendVoice.getReplayMarkup().toJson().toString(), ContentType.create("text/plain", StandardCharsets.UTF_8));