Program: 157369
Project: 157369
Buggy source:
@Test public void testForceMakeKeyboardsOnAddOnsPrefChange(){
  Mockito.reset(mAnySoftKeyboardUnderTest.getSpiedKeyboardSwitcher());
  SharedPrefsHelper.setPrefsValue(KeyboardAddOnAndBuilder.KEYBOARD_PREF_PREFIX + "String_Node_Str",false);
  Mockito.verify(mAnySoftKeyboardUnderTest.getSpiedKeyboardSwitcher()).flushKeyboardsCache();
  Mockito.verify(mAnySoftKeyboardUnderTest.getSpiedKeyboardSwitcher()).setInputView(Mockito.isNotNull(AnyKeyboardView.class));
  Mockito.reset(mAnySoftKeyboardUnderTest.getSpiedKeyboardSwitcher());
  SharedPrefsHelper.setPrefsValue("String_Node_Str",false);
  Mockito.verify(mAnySoftKeyboardUnderTest.getSpiedKeyboardSwitcher()).flushKeyboardsCache();
  Mockito.verify(mAnySoftKeyboardUnderTest.getSpiedKeyboardSwitcher()).setInputView(Mockito.isNotNull(AnyKeyboardView.class));
  Mockito.reset(mAnySoftKeyboardUnderTest.getSpiedKeyboardSwitcher());
  SharedPrefsHelper.setPrefsValue(RuntimeEnvironment.application.getString(R.string.settings_key_active_quick_text_key),"String_Node_Str");
  Mockito.verify(mAnySoftKeyboardUnderTest.getSpiedKeyboardSwitcher()).flushKeyboardsCache();
  Mockito.verify(mAnySoftKeyboardUnderTest.getSpiedKeyboardSwitcher()).setInputView(Mockito.isNotNull(AnyKeyboardView.class));
  Mockito.reset(mAnySoftKeyboardUnderTest.getSpiedKeyboardSwitcher());
  SharedPrefsHelper.setPrefsValue(RuntimeEnvironment.application.getString(R.string.settings_key_ext_kbd_top_row_key),"String_Node_Str");
  Mockito.verify(mAnySoftKeyboardUnderTest.getSpiedKeyboardSwitcher()).flushKeyboardsCache();
  Mockito.verify(mAnySoftKeyboardUnderTest.getSpiedKeyboardSwitcher()).setInputView(Mockito.isNotNull(AnyKeyboardView.class));
  Mockito.reset(mAnySoftKeyboardUnderTest.getSpiedKeyboardSwitcher());
  SharedPrefsHelper.setPrefsValue(RuntimeEnvironment.application.getString(R.string.settings_key_ext_kbd_bottom_row_key),"String_Node_Str");
  Mockito.verify(mAnySoftKeyboardUnderTest.getSpiedKeyboardSwitcher()).flushKeyboardsCache();
  Mockito.verify(mAnySoftKeyboardUnderTest.getSpiedKeyboardSwitcher()).setInputView(Mockito.isNotNull(AnyKeyboardView.class));
  Mockito.reset(mAnySoftKeyboardUnderTest.getSpiedKeyboardSwitcher());
  SharedPrefsHelper.setPrefsValue("String_Node_Str","String_Node_Str");
  Mockito.verify(mAnySoftKeyboardUnderTest.getSpiedKeyboardSwitcher(),Mockito.never()).flushKeyboardsCache();
  Mockito.verify(mAnySoftKeyboardUnderTest.getSpiedKeyboardSwitcher(),Mockito.never()).setInputView(Mockito.isNotNull(AnyKeyboardView.class));
}

Fixed version (ground truth):
@Test public void testForceMakeKeyboardsOnAddOnsPrefChange(){
  Mockito.reset(mAnySoftKeyboardUnderTest.getSpiedKeyboardSwitcher());
  SharedPrefsHelper.setPrefsValue(KeyboardAddOnAndBuilder.KEYBOARD_PREF_PREFIX + "String_Node_Str",false);
  Mockito.verify(mAnySoftKeyboardUnderTest.getSpiedKeyboardSwitcher()).flushKeyboardsCache();
  Mockito.verify(mAnySoftKeyboardUnderTest.getSpiedKeyboardSwitcher()).setInputView(Mockito.isNotNull(AnyKeyboardView.class));
  Mockito.reset(mAnySoftKeyboardUnderTest.getSpiedKeyboardSwitcher());
  SharedPrefsHelper.setPrefsValue("String_Node_Str",false);
  Mockito.verify(mAnySoftKeyboardUnderTest.getSpiedKeyboardSwitcher()).flushKeyboardsCache();
  Mockito.verify(mAnySoftKeyboardUnderTest.getSpiedKeyboardSwitcher()).setInputView(Mockito.isNotNull(AnyKeyboardView.class));
  Mockito.reset(mAnySoftKeyboardUnderTest.getSpiedKeyboardSwitcher());
  SharedPrefsHelper.setPrefsValue(RuntimeEnvironment.application.getString(R.string.settings_key_active_quick_text_key),"String_Node_Str");
  Mockito.verify(mAnySoftKeyboardUnderTest.getSpiedKeyboardSwitcher()).flushKeyboardsCache();
  Mockito.verify(mAnySoftKeyboardUnderTest.getSpiedKeyboardSwitcher()).setInputView(Mockito.isNotNull(AnyKeyboardView.class));
  Mockito.reset(mAnySoftKeyboardUnderTest.getSpiedKeyboardSwitcher());
  SharedPrefsHelper.setPrefsValue(RuntimeEnvironment.application.getString(R.string.settings_key_ext_kbd_top_row_key),"String_Node_Str");
  Mockito.verify(mAnySoftKeyboardUnderTest.getSpiedKeyboardSwitcher(),Mockito.times(2)).flushKeyboardsCache();
  Mockito.verify(mAnySoftKeyboardUnderTest.getSpiedKeyboardSwitcher(),Mockito.times(2)).setInputView(Mockito.isNotNull(AnyKeyboardView.class));
  Mockito.reset(mAnySoftKeyboardUnderTest.getSpiedKeyboardSwitcher());
  SharedPrefsHelper.setPrefsValue(RuntimeEnvironment.application.getString(R.string.settings_key_ext_kbd_bottom_row_key),"String_Node_Str");
  Mockito.verify(mAnySoftKeyboardUnderTest.getSpiedKeyboardSwitcher(),Mockito.times(2)).flushKeyboardsCache();
  Mockito.verify(mAnySoftKeyboardUnderTest.getSpiedKeyboardSwitcher(),Mockito.times(2)).setInputView(Mockito.isNotNull(AnyKeyboardView.class));
  Mockito.reset(mAnySoftKeyboardUnderTest.getSpiedKeyboardSwitcher());
  SharedPrefsHelper.setPrefsValue("String_Node_Str","String_Node_Str");
  Mockito.verify(mAnySoftKeyboardUnderTest.getSpiedKeyboardSwitcher(),Mockito.never()).flushKeyboardsCache();
  Mockito.verify(mAnySoftKeyboardUnderTest.getSpiedKeyboardSwitcher(),Mockito.never()).setInputView(Mockito.isNotNull(AnyKeyboardView.class));
}