Program: 157333
Project: 157333
Buggy source:
@NonNull private synchronized AnyKeyboard getSymbolsKeyboard(int keyboardIndex,@Keyboard.KeyboardRowModeId int mode){
  ensureKeyboardsAreBuilt();
  AnyKeyboard keyboard=mSymbolsKeyboardsArray[keyboardIndex];
  if (keyboard == null) {
switch (keyboardIndex) {
case SYMBOLS_KEYBOARD_REGULAR_INDEX:
      if (AnyApplication.getConfig().use16KeysSymbolsKeyboards())       keyboard=createGenericKeyboard(mDefaultAddOn,mContext,R.xml.symbols_16keys,R.xml.symbols,mContext.getString(R.string.symbols_keyboard),"String_Node_Str",mode,false);
 else       keyboard=createGenericKeyboard(mDefaultAddOn,mContext,R.xml.symbols,R.xml.symbols,mContext.getString(R.string.symbols_keyboard),"String_Node_Str",mode,false);
    break;
case SYMBOLS_KEYBOARD_ALT_INDEX:
  if (AnyApplication.getConfig().use16KeysSymbolsKeyboards())   keyboard=createGenericKeyboard(mDefaultAddOn,mContext,R.xml.symbols_alt_16keys,R.xml.symbols_alt,mContext.getString(R.string.symbols_alt_keyboard),"String_Node_Str",mode,false);
 else   keyboard=createGenericKeyboard(mDefaultAddOn,mContext,R.xml.symbols_alt,R.xml.symbols_alt,mContext.getString(R.string.symbols_alt_keyboard),"String_Node_Str",mode,false);
break;
case SYMBOLS_KEYBOARD_ALT_NUMBERS_INDEX:
keyboard=createGenericKeyboard(mDefaultAddOn,mContext,R.xml.simple_alt_numbers,R.xml.simple_alt_numbers,mContext.getString(R.string.symbols_alt_num_keyboard),"String_Node_Str",mode,false);
break;
case SYMBOLS_KEYBOARD_PHONE_INDEX:
keyboard=createGenericKeyboard(mDefaultAddOn,mContext,R.xml.simple_phone,R.xml.simple_phone,mContext.getString(R.string.symbols_phone_keyboard),"String_Node_Str",mode,true);
break;
case SYMBOLS_KEYBOARD_NUMBERS_INDEX:
keyboard=createGenericKeyboard(mDefaultAddOn,mContext,R.xml.simple_numbers,R.xml.simple_numbers,mContext.getString(R.string.symbols_numbers_keyboard),"String_Node_Str",mode,false);
break;
case SYMBOLS_KEYBOARD_DATETIME_INDEX:
keyboard=createGenericKeyboard(mDefaultAddOn,mContext,R.xml.simple_datetime,R.xml.simple_datetime,mContext.getString(R.string.symbols_time_keyboard),"String_Node_Str",mode,false);
break;
default :
throw new IllegalArgumentException("String_Node_Str" + keyboardIndex);
}
mSymbolsKeyboardsArray[keyboardIndex]=keyboard;
mLastSelectedSymbolsKeyboard=keyboardIndex;
keyboard.loadKeyboard((mInputView != null) ? mInputView.getThemedKeyboardDimens() : mKeyboardDimens);
mIME.onSymbolsKeyboardSet(keyboard);
}
return keyboard;
}

Fixed version (ground truth):
@NonNull private synchronized AnyKeyboard getSymbolsKeyboard(int keyboardIndex,@Keyboard.KeyboardRowModeId int mode){
  ensureKeyboardsAreBuilt();
  AnyKeyboard keyboard=mSymbolsKeyboardsArray[keyboardIndex];
  if (keyboard == null || keyboard.getKeyboardMode() != mode) {
switch (keyboardIndex) {
case SYMBOLS_KEYBOARD_REGULAR_INDEX:
      if (AnyApplication.getConfig().use16KeysSymbolsKeyboards())       keyboard=createGenericKeyboard(mDefaultAddOn,mContext,R.xml.symbols_16keys,R.xml.symbols,mContext.getString(R.string.symbols_keyboard),"String_Node_Str",mode,false);
 else       keyboard=createGenericKeyboard(mDefaultAddOn,mContext,R.xml.symbols,R.xml.symbols,mContext.getString(R.string.symbols_keyboard),"String_Node_Str",mode,false);
    break;
case SYMBOLS_KEYBOARD_ALT_INDEX:
  if (AnyApplication.getConfig().use16KeysSymbolsKeyboards())   keyboard=createGenericKeyboard(mDefaultAddOn,mContext,R.xml.symbols_alt_16keys,R.xml.symbols_alt,mContext.getString(R.string.symbols_alt_keyboard),"String_Node_Str",mode,false);
 else   keyboard=createGenericKeyboard(mDefaultAddOn,mContext,R.xml.symbols_alt,R.xml.symbols_alt,mContext.getString(R.string.symbols_alt_keyboard),"String_Node_Str",mode,false);
break;
case SYMBOLS_KEYBOARD_ALT_NUMBERS_INDEX:
keyboard=createGenericKeyboard(mDefaultAddOn,mContext,R.xml.simple_alt_numbers,R.xml.simple_alt_numbers,mContext.getString(R.string.symbols_alt_num_keyboard),"String_Node_Str",mode,false);
break;
case SYMBOLS_KEYBOARD_PHONE_INDEX:
keyboard=createGenericKeyboard(mDefaultAddOn,mContext,R.xml.simple_phone,R.xml.simple_phone,mContext.getString(R.string.symbols_phone_keyboard),"String_Node_Str",mode,true);
break;
case SYMBOLS_KEYBOARD_NUMBERS_INDEX:
keyboard=createGenericKeyboard(mDefaultAddOn,mContext,R.xml.simple_numbers,R.xml.simple_numbers,mContext.getString(R.string.symbols_numbers_keyboard),"String_Node_Str",mode,false);
break;
case SYMBOLS_KEYBOARD_DATETIME_INDEX:
keyboard=createGenericKeyboard(mDefaultAddOn,mContext,R.xml.simple_datetime,R.xml.simple_datetime,mContext.getString(R.string.symbols_time_keyboard),"String_Node_Str",mode,false);
break;
default :
throw new IllegalArgumentException("String_Node_Str" + keyboardIndex);
}
mSymbolsKeyboardsArray[keyboardIndex]=keyboard;
mLastSelectedSymbolsKeyboard=keyboardIndex;
keyboard.loadKeyboard((mInputView != null) ? mInputView.getThemedKeyboardDimens() : mKeyboardDimens);
mIME.onSymbolsKeyboardSet(keyboard);
}
return keyboard;
}