Program: 157322
Project: 157322
Buggy source:
private void initKeysMembers(Context askContext){
  for (  final Key key : getKeys()) {
    if (key.codes.length > 0) {
      final int primaryCode=key.getPrimaryCode();
      if (key instanceof AnyKey) {
switch (primaryCode) {
case KeyCodes.DELETE:
case KeyCodes.MODE_ALPHABET:
case KeyCodes.KEYBOARD_MODE_CHANGE:
case KeyCodes.KEYBOARD_CYCLE:
case KeyCodes.KEYBOARD_CYCLE_INSIDE_MODE:
case KeyCodes.KEYBOARD_REVERSE_CYCLE:
case KeyCodes.ALT:
case KeyCodes.MODE_SYMOBLS:
case KeyCodes.QUICK_TEXT:
case KeyCodes.DOMAIN:
case KeyCodes.CANCEL:
case KeyCodes.CTRL:
          ((AnyKey)key).setAsFunctional();
        break;
    }
  }
  if (Workarounds.isRightToLeftCharacter((char)primaryCode))   mRightToLeftLayout=true;
switch (primaryCode) {
case KeyCodes.QUICK_TEXT:
    QuickTextKey quickKey=QuickTextKeyFactory.getCurrentQuickTextKey(askContext);
  if (quickKey == null) {
    Logger.w(TAG,"String_Node_Str");
    break;
  }
Resources quickTextKeyResources=quickKey.getPackageContext().getResources();
key.label=quickKey.getKeyLabel();
int iconResId=quickKey.getKeyIconResId();
int previewResId=quickKey.getIconPreviewResId();
if (iconResId > 0) {
setKeyIcons(key,quickTextKeyResources,iconResId,previewResId);
}
if (key instanceof AnyKey) {
AnyKey anyKey=(AnyKey)key;
if (anyKey.longPressCode == 0 && anyKey.popupResId == 0 && TextUtils.isEmpty(anyKey.popupCharacters)) {
anyKey.longPressCode=KeyCodes.QUICK_TEXT_POPUP;
}
}
break;
case KeyCodes.DOMAIN:
key.label=AnyApplication.getConfig().getDomainText().trim();
key.popupResId=R.xml.popup_domains;
break;
default :
if (isAlphabetKey(key) && (key.icon == null)) {
final boolean labelIsOriginallyEmpty=TextUtils.isEmpty(key.label);
if (labelIsOriginallyEmpty) {
final char code=(char)key.codes[0];
if (code > 31 && !Character.isWhitespace(code)) key.label=Character.toString(code);
}
}
}
}
}
mKeyboardCondenser=new KeyboardCondenser(askContext,this);
}

Fixed version (ground truth):
private void initKeysMembers(Context askContext){
  for (  final Key key : getKeys()) {
    if (key.codes.length > 0) {
      final int primaryCode=key.getPrimaryCode();
      if (key instanceof AnyKey) {
switch (primaryCode) {
case KeyCodes.DELETE:
case KeyCodes.MODE_ALPHABET:
case KeyCodes.KEYBOARD_MODE_CHANGE:
case KeyCodes.KEYBOARD_CYCLE:
case KeyCodes.KEYBOARD_CYCLE_INSIDE_MODE:
case KeyCodes.KEYBOARD_REVERSE_CYCLE:
case KeyCodes.ALT:
case KeyCodes.MODE_SYMOBLS:
case KeyCodes.QUICK_TEXT:
case KeyCodes.DOMAIN:
case KeyCodes.CANCEL:
case KeyCodes.CTRL:
case KeyCodes.SHIFT:
          ((AnyKey)key).setAsFunctional();
        break;
    }
  }
  if (Workarounds.isRightToLeftCharacter((char)primaryCode))   mRightToLeftLayout=true;
switch (primaryCode) {
case KeyCodes.QUICK_TEXT:
    QuickTextKey quickKey=QuickTextKeyFactory.getCurrentQuickTextKey(askContext);
  if (quickKey == null) {
    Logger.w(TAG,"String_Node_Str");
    break;
  }
Resources quickTextKeyResources=quickKey.getPackageContext().getResources();
key.label=quickKey.getKeyLabel();
int iconResId=quickKey.getKeyIconResId();
int previewResId=quickKey.getIconPreviewResId();
if (iconResId > 0) {
setKeyIcons(key,quickTextKeyResources,iconResId,previewResId);
}
if (key instanceof AnyKey) {
AnyKey anyKey=(AnyKey)key;
if (anyKey.longPressCode == 0 && anyKey.popupResId == 0 && TextUtils.isEmpty(anyKey.popupCharacters)) {
anyKey.longPressCode=KeyCodes.QUICK_TEXT_POPUP;
}
}
break;
case KeyCodes.DOMAIN:
key.label=AnyApplication.getConfig().getDomainText().trim();
key.popupResId=R.xml.popup_domains;
break;
default :
if (isAlphabetKey(key) && (key.icon == null)) {
final boolean labelIsOriginallyEmpty=TextUtils.isEmpty(key.label);
if (labelIsOriginallyEmpty) {
final char code=(char)key.codes[0];
if (code > 31 && !Character.isWhitespace(code)) key.label=Character.toString(code);
}
}
}
}
}
mKeyboardCondenser=new KeyboardCondenser(askContext,this);
}