Buggy code:
public class HaberActivity extends ActionBarActivity implements Haber . HaberListener { HashMap < Chat , HaberActivity . ChatThread > chatThreads = new HashMap < > ( ) ; private HaberActivity . ChatThread mainChatThread ; private ListView chatListView ; private AlertDialog smileyDialog ; private boolean vibrationLock = true ; private static HaberActivity instance = null ; private ActionBarDrawerToggle mDrawerToggle ; private float lastTranslate = 0.0F ; private DrawerLayout mDrawerLayout ; private RelativeLayout rlContent ; public static HaberActivity getInstance ( ) { } private CommandBarListener cmdListener = new ChatAdapter . CommandBarListener ( ) { @ Override public void onKick ( final String user ) { } @ Override public void onReply ( String user ) { } @ Override public void onPrivateMessage ( String user ) { } } ; private Runnable sendMessage = new Runnable ( ) { @ Override public void run ( ) { } } ; void sortTabs ( ) { } public void openUrl ( final String url ) { } Chat getCurrentChat ( ) { } public void onSmileyClick ( View v ) { } public void appendMessage ( final String str ) { } @ Override public void onResume ( ) { } @ Override public void onPause ( ) { } @ Override public void onDestroy ( ) { } public static boolean InstanceExists ( ) { } public void setListViewDivider ( int height ) { } @ Override protected void onCreate ( Bundle savedInstanceState ) { } @ Override public boolean onKeyDown ( int keyCode , KeyEvent event ) { } @ Override public void onStatusChanged ( String status ) { } @ Override public void onLoggedIn ( MultiUserChat haberChat ) { } @ Override public void onMessageReceived ( final Chat chat , final Message message ) { runOnUiThread ( new Runnable ( ) { @ Override public void run ( ) { <START_BUG> boolean vibratedYet = false ; <END_BUG> if ( chat != null ) { if ( chatThreads . containsKey ( chat ) ) { chatThreads . get ( chat ) . chatAdapter . addItem ( message ) ; try { Chat cchat = getCurrentChat ( ) ; if ( cchat != chat ) chatThreads . get ( chat ) . markTab ( ) ; } catch ( Exception er ) { Debug . log ( er ) ; } } else { HaberActivity . ChatThread thread = new HaberActivity . ChatThread ( chat . getParticipant ( ) ) ; thread . chatAdapter = new ChatAdapter ( HaberActivity . this , new ArrayList < adnan . haber . types . ListChatItem > ( ) , cmdListener , true ) ; for ( Message msg : ChatSaver . getSavedMessages ( ) ) { if ( ( msg . getFrom ( ) . equals ( chat . getParticipant ( ) ) ) || ( msg . getTo ( ) . equals ( chat . getParticipant ( ) ) ) ) { if ( msg . getPacketID ( ) . equals ( "divider" ) ) thread . chatAdapter . putDivider ( msg . getBody ( ) ) ; else thread . chatAdapter . addItem ( msg ) ; } } thread . chatAdapter . addItem ( message ) ; chatThreads . put ( chat , thread ) ; try { Chat cchat = getCurrentChat ( ) ; if ( cchat != chat ) thread . markTab ( ) ; } catch ( Exception er ) { Debug . log ( er ) ; } } if ( ( AdvancedPreferences . ShouldVibrate ( HaberActivity . this ) ) && ( ! ( vibrationLock ) ) ) { if ( ( ( getCurrentChat ( ) ) != chat ) || ( ( ( getCurrentChat ( ) ) == chat ) && ( AdvancedPreferences . ShouldVibrateOnActive ( HaberActivity . this ) ) ) ) { ( ( android . os . Vibrator ) ( getSystemService ( Context . VIBRATOR_SERVICE ) ) ) . vibrate ( 100 ) ; vibratedYet = true ; } } } else { mainChatThread . chatAdapter . addItem ( message ) ; if ( ( AdvancedPreferences . ShouldVibrate ( HaberActivity . this ) ) && ( ! ( vibrationLock ) ) ) { if ( ( ( ( getCurrentChat ( ) ) != null ) && ( AdvancedPreferences . ShouldVibrateOnPublic ( HaberActivity . this ) ) ) || ( ( ( getCurrentChat ( ) ) == null ) && ( AdvancedPreferences . ShouldVibrateOnActive ( HaberActivity . this ) ) ) ) { ( ( android . os . Vibrator ) ( getSystemService ( Context . VIBRATOR_SERVICE ) ) ) . vibrate ( 100 ) ; vibratedYet = true ; } } try { if ( ( getCurrentChat ( ) ) != null ) mainChatThread . markTab ( ) ; } catch ( Exception er ) { Debug . log ( er ) ; } } scrollToBottom ( true ) ; sortTabs ( ) ; if ( AdvancedPreferences . ShouldVibrate ( HaberActivity . this ) ) { if ( ( ( ( ! ( vibrationLock ) ) && ( ! vibratedYet ) ) && ( AdvancedPreferences . ShouldVibrateOnReply ( HaberActivity . this ) ) ) && ( ( message . getBody ( ) ) != null ) ) { String mark = "@" + ( Haber . getUsername ( ) ) ; if ( message . getBody ( ) . toUpperCase ( ) . contains ( mark . toUpperCase ( ) ) ) { ( ( android . os . Vibrator ) ( getSystemService ( Context . VIBRATOR_SERVICE ) ) ) . vibrate ( 100 ) ; vibratedYet = true ; } else if ( Haber . IsGuest ( ) ) { mark = "@" + ( Haber . getUsername ( ) . substring ( 1 ) ) ;

Fix:
boolean vibratedYet = message . getSubject ( ) . equals ( OUTGOING ) ;