[Demonstration 1]

[Buggy Method]
public boolean isBluetoothEnabled() {
    return mBluetoothAdapter.isEnabled();
}

[Buggy Hunk]
return mBluetoothAdapter.isEnabled();

[Patch]
return mBluetoothAdapter != null && mBluetoothAdapter.isEnabled();

[Demonstration 2]

[Buggy Method]
private static void setText(MimePart part, String plainText, String htmlText) throws MessagingException {
    if (plainText == null) {
        if (htmlText == null) {
            part.setText("");
        } else {
            part.setContent(htmlText, "text/html; charset=utf-8");
        }
    } else {
        if (htmlText == null) {
            part.setContent(plainText, "text/plain; charset=utf-8");
        } else {
            MimeMultipart multipart = new MimeMultipart();
            multipart.setSubType("alternative");
            MimeBodyPart plainPart = new MimeBodyPart();
            plainPart.setContent(plainText, "text/plain; charset=utf-8");
            multipart.addBodyPart(plainPart);
            MimeBodyPart htmlPart = new MimeBodyPart();
            htmlPart.setContent(htmlText, "text/html; charset=utf-8");
            multipart.addBodyPart(htmlPart);
            part.setContent(multipart);
        }
    }
}

[Buggy Hunk]
part.setContent(plainText, "text/plain; charset=utf-8");

[Patch]
part.setText(plainText, "utf-8");

[Demonstration 3]

[Buggy Method]
public static void setProperties() throws MessagingException {
    Properties props = new Properties();
    //props.put("mail.store.protocol", "imaps");
    props.put(protocolForRetrievingData, messageAccessProtocol);
    Session session = Session.getDefaultInstance(props, null);
    //Store store = session.getStore("imaps");
    store = session.getStore(messageAccessProtocol);
    //store.connect("imap.googlemail.com","apostollmatt9@gmail.com", "Slayer41");
    store.connect(host, email, password);
}

[Buggy Hunk]
public static void setProperties() throws MessagingException {

[Patch]
public void setProperties() throws MessagingException {