[Demonstration 1]

[Buggy Method]
public void ApplyVolumeForCurrentType() {
    AudioManager audioManager = (AudioManager) MainActivity.main.getSystemService(Context.AUDIO_SERVICE);
    int maxVolume = audioManager.getStreamMaxVolume(AudioManager.STREAM_MUSIC);
    if (!MainActivity.main.bluetoothConnected && normalVolumeToApply != -1) {
        audioManager.setStreamVolume(AudioManager.STREAM_MUSIC, (int) (bluetoothVolumeToApply * maxVolume), 0);
        normalVolumeToApply = -1;
    } else if (MainActivity.main.bluetoothConnected && bluetoothVolumeToApply != -1) {
        audioManager.setStreamVolume(AudioManager.STREAM_MUSIC, (int) (bluetoothVolumeToApply * maxVolume), 0);
        bluetoothVolumeToApply = -1;
    }
}

[Buggy Hunk]
audioManager.setStreamVolume(AudioManager.STREAM_MUSIC, (int) (bluetoothVolumeToApply * maxVolume), 0);

[Patch]
audioManager.setStreamVolume(AudioManager.STREAM_MUSIC, (int) (normalVolumeToApply * maxVolume), 0);

[Demonstration 2]

[Buggy Method]
private void playMedia() {
    if (!mMediaPlayer.isPlaying()) {
        mMediaPlayer.start();
        updateNotification(ACTION_PAUSE);
    }
}

[Buggy Hunk]
if (!mMediaPlayer.isPlaying()) {

[Patch]
if (!mMediaPlayer.isPlaying() && requestAudioFocus()) {