Program: 157555
Project: 157555
Buggy source:
/** 
 * This looks at the ime options given by the current editor, to set the appropriate label on the keyboard's enter key (if it has one).
 */
public void setImeOptions(Resources res,EditorInfo editor){
  if (mDebug) {
    if (editor == null) {
      Log.d(TAG,"String_Node_Str");
    }
 else {
      Log.d(TAG,"String_Node_Str" + editor.packageName + "String_Node_Str"+ editor.fieldId);
    }
  }
  if (mEnterKey == null) {
    return;
  }
  if (Workarounds.doubleActionKeyDisableWorkAround(editor)) {
    mEnterKey.disable();
    return;
  }
  int options=(editor == null) ? 0 : editor.imeOptions;
  CharSequence imeLabel=(editor == null) ? null : editor.actionLabel;
  int imeActionId=(editor == null) ? -1 : editor.actionId;
  mEnterKey.enable();
  boolean inNoEnterActionMode=((options & EditorInfo.IME_FLAG_NO_ENTER_ACTION) != 0);
  final int action=(options & EditorInfo.IME_MASK_ACTION);
  if (AnySoftKeyboardConfiguration.getInstance().getDEBUG())   Log.d(TAG,"String_Node_Str" + action + "String_Node_Str"+ inNoEnterActionMode);
  if (inNoEnterActionMode) {
    mEnterKey.icon=res.getDrawable(R.drawable.sym_keyboard_return);
    mEnterKey.label=null;
  }
 else {
switch (action) {
case EditorInfo.IME_ACTION_GO:
      mEnterKey.iconPreview=null;
    mEnterKey.icon=null;
  mEnterKey.label=Workarounds.workaroundCorrectStringDirection(res.getText(R.string.label_go_key));
break;
case EditorInfo.IME_ACTION_NEXT:
mEnterKey.iconPreview=null;
mEnterKey.icon=null;
mEnterKey.label=Workarounds.workaroundCorrectStringDirection(res.getText(R.string.label_next_key));
break;
case EditorInfo.IME_ACTION_DONE:
mEnterKey.iconPreview=null;
mEnterKey.icon=null;
mEnterKey.label=Workarounds.workaroundCorrectStringDirection(res.getText(R.string.label_done_key));
break;
case EditorInfo.IME_ACTION_NONE:
Log.d(TAG,"String_Node_Str");
mEnterKey.disable();
break;
case EditorInfo.IME_ACTION_SEARCH:
mEnterKey.icon=res.getDrawable(R.drawable.sym_keyboard_search);
mEnterKey.label=null;
break;
case EditorInfo.IME_ACTION_SEND:
mEnterKey.iconPreview=null;
mEnterKey.icon=null;
mEnterKey.label=Workarounds.workaroundCorrectStringDirection(res.getText(R.string.label_send_key));
break;
case EditorInfo.IME_ACTION_UNSPECIFIED:
default :
mEnterKey.icon=res.getDrawable(R.drawable.sym_keyboard_return);
mEnterKey.label=null;
break;
}
}
}

Fixed version (ground truth):
/** 
 * This looks at the ime options given by the current editor, to set the appropriate label on the keyboard's enter key (if it has one).
 */
public void setImeOptions(Resources res,EditorInfo editor){
  if (mDebug) {
    if (editor == null) {
      Log.d(TAG,"String_Node_Str");
    }
 else {
      Log.d(TAG,"String_Node_Str" + editor.packageName + "String_Node_Str"+ editor.fieldId);
    }
  }
  if (mEnterKey == null) {
    return;
  }
  if (Workarounds.doubleActionKeyDisableWorkAround(editor)) {
    mEnterKey.disable();
    return;
  }
  int options=(editor == null) ? 0 : editor.imeOptions;
  CharSequence imeLabel=(editor == null) ? null : editor.actionLabel;
  int imeActionId=(editor == null) ? -1 : editor.actionId;
  mEnterKey.enable();
  boolean inNoEnterActionMode=((options & EditorInfo.IME_FLAG_NO_ENTER_ACTION) != 0);
  final int action=(options & EditorInfo.IME_MASK_ACTION);
  if (AnySoftKeyboardConfiguration.getInstance().getDEBUG())   Log.d(TAG,"String_Node_Str" + action + "String_Node_Str"+ inNoEnterActionMode);
  if (inNoEnterActionMode) {
    mEnterKey.icon=res.getDrawable(R.drawable.sym_keyboard_return);
    mEnterKey.label=null;
  }
 else {
switch (action) {
case EditorInfo.IME_ACTION_GO:
      mEnterKey.iconPreview=null;
    mEnterKey.icon=null;
  mEnterKey.label=Workarounds.workaroundCorrectStringDirection(res.getText(R.string.label_go_key));
break;
case EditorInfo.IME_ACTION_NEXT:
mEnterKey.iconPreview=null;
mEnterKey.icon=null;
mEnterKey.label=Workarounds.workaroundCorrectStringDirection(res.getText(R.string.label_next_key));
break;
case EditorInfo.IME_ACTION_DONE:
mEnterKey.iconPreview=null;
mEnterKey.icon=null;
mEnterKey.label=Workarounds.workaroundCorrectStringDirection(res.getText(R.string.label_done_key));
break;
case EditorInfo.IME_ACTION_SEARCH:
mEnterKey.icon=res.getDrawable(R.drawable.sym_keyboard_search);
mEnterKey.label=null;
break;
case EditorInfo.IME_ACTION_SEND:
mEnterKey.iconPreview=null;
mEnterKey.icon=null;
mEnterKey.label=Workarounds.workaroundCorrectStringDirection(res.getText(R.string.label_send_key));
break;
case EditorInfo.IME_ACTION_NONE:
case EditorInfo.IME_ACTION_UNSPECIFIED:
default :
mEnterKey.icon=res.getDrawable(R.drawable.sym_keyboard_return);
mEnterKey.label=null;
break;
}
}
}