Program: 157548
Project: 157548
Buggy source:
private void showQuickTextKeyPopupList(QuickTextKey key){
  if (mQuickTextKeyDialog == null) {
    String[] names=getResources().getStringArray(R.array.smiley_names);
    final String[] texts=getResources().getStringArray(R.array.smiley_texts);
    final int N=names.length;
    List<Map<String,?>> entries=new ArrayList<Map<String,?>>();
    for (int i=0; i < N; i++) {
      HashMap<String,Object> entry=new HashMap<String,Object>();
      entry.put("String_Node_Str",names[i]);
      entry.put("String_Node_Str",texts[i]);
      entries.add(entry);
    }
    final SimpleAdapter a=new SimpleAdapter(this,entries,R.layout.quick_text_key_menu_item,new String[]{"String_Node_Str","String_Node_Str"},new int[]{R.id.quick_text_name,R.id.quick_text_output});
    SimpleAdapter.ViewBinder viewBinder=new SimpleAdapter.ViewBinder(){
      public boolean setViewValue(      View view,      Object data,      String textRepresentation){
        if (view instanceof ImageView) {
          Drawable img=getResources().getDrawable((Integer)data);
          ((ImageView)view).setImageDrawable(img);
          return true;
        }
        return false;
      }
    }
;
    a.setViewBinder(viewBinder);
    AlertDialog.Builder b=new AlertDialog.Builder(this);
    b.setTitle(getString(R.string.menu_insert_smiley));
    b.setCancelable(true);
    b.setAdapter(a,new DialogInterface.OnClickListener(){
      @SuppressWarnings("String_Node_Str") public final void onClick(      DialogInterface dialog,      int which){
        HashMap<String,Object> item=(HashMap<String,Object>)a.getItem(which);
        onText((String)item.get("String_Node_Str"));
        dialog.dismiss();
      }
    }
);
    mQuickTextKeyDialog=b.create();
    Window window=mQuickTextKeyDialog.getWindow();
    WindowManager.LayoutParams lp=window.getAttributes();
    lp.token=mInputView.getWindowToken();
    lp.type=WindowManager.LayoutParams.TYPE_APPLICATION_ATTACHED_DIALOG;
    window.setAttributes(lp);
    window.addFlags(WindowManager.LayoutParams.FLAG_ALT_FOCUSABLE_IM);
  }
  mQuickTextKeyDialog.show();
}

Fixed version (ground truth):
private void showQuickTextKeyPopupList(QuickTextKey key){
  if (mQuickTextKeyDialog == null) {
    String[] names=key.getPopupListNames();
    final String[] texts=key.getPopupListValues();
    final int N=names.length;
    List<Map<String,?>> entries=new ArrayList<Map<String,?>>();
    for (int i=0; i < N; i++) {
      HashMap<String,Object> entry=new HashMap<String,Object>();
      entry.put("String_Node_Str",names[i]);
      entry.put("String_Node_Str",texts[i]);
      entries.add(entry);
    }
    final SimpleAdapter a=new SimpleAdapter(this,entries,R.layout.quick_text_key_menu_item,new String[]{"String_Node_Str","String_Node_Str"},new int[]{R.id.quick_text_name,R.id.quick_text_output});
    SimpleAdapter.ViewBinder viewBinder=new SimpleAdapter.ViewBinder(){
      public boolean setViewValue(      View view,      Object data,      String textRepresentation){
        if (view instanceof ImageView) {
          Drawable img=getResources().getDrawable((Integer)data);
          ((ImageView)view).setImageDrawable(img);
          return true;
        }
        return false;
      }
    }
;
    a.setViewBinder(viewBinder);
    AlertDialog.Builder b=new AlertDialog.Builder(this);
    b.setTitle(getString(R.string.menu_insert_smiley));
    b.setCancelable(true);
    b.setAdapter(a,new DialogInterface.OnClickListener(){
      @SuppressWarnings("String_Node_Str") public final void onClick(      DialogInterface dialog,      int which){
        HashMap<String,Object> item=(HashMap<String,Object>)a.getItem(which);
        onText((String)item.get("String_Node_Str"));
        dialog.dismiss();
      }
    }
);
    mQuickTextKeyDialog=b.create();
    Window window=mQuickTextKeyDialog.getWindow();
    WindowManager.LayoutParams lp=window.getAttributes();
    lp.token=mInputView.getWindowToken();
    lp.type=WindowManager.LayoutParams.TYPE_APPLICATION_ATTACHED_DIALOG;
    window.setAttributes(lp);
    window.addFlags(WindowManager.LayoutParams.FLAG_ALT_FOCUSABLE_IM);
  }
  mQuickTextKeyDialog.show();
}