Program: 14227
Project: 14227
Buggy source:
private View getListEditorView(final Dialog dialog,String footerText){
  ContextThemeWrapper wrapper=new ContextThemeWrapper(getActivity(),R.style.Calypso_SiteSettingsTheme);
  View view=View.inflate(wrapper,R.layout.list_editor,null);
  ((TextView)view.findViewById(R.id.list_editor_footer_text)).setText(footerText);
  final MultiSelectListView list=(MultiSelectListView)view.findViewById(android.R.id.list);
  list.setEnterMultiSelectListener(new MultiSelectListView.OnEnterMultiSelect(){
    @Override public void onEnterMultiSelect(){
      WPActivityUtils.setStatusBarColor(dialog.getWindow(),R.color.action_mode_status_bar_tint);
    }
  }
);
  list.setExitMultiSelectListener(new MultiSelectListView.OnExitMultiSelect(){
    @Override public void onExitMultiSelect(){
      WPActivityUtils.setStatusBarColor(dialog.getWindow(),R.color.status_bar_tint);
    }
  }
);
  list.setDeleteRequestListener(new MultiSelectListView.OnDeleteRequested(){
    @Override public boolean onDeleteRequested(){
      SparseBooleanArray checkedItems=list.getCheckedItemPositions();
      HashMap<String,Object> properties=new HashMap<>();
      properties.put("String_Node_Str",checkedItems.size());
      AnalyticsUtils.trackWithCurrentBlogDetails(AnalyticsTracker.Stat.SETTINGS_DELETED_LIST_ITEMS,properties);
      ListAdapter adapter=list.getAdapter();
      for (int i=0; i < checkedItems.size(); i++) {
        final int index=checkedItems.keyAt(i);
        if (checkedItems.get(index) && mEditingList.size() > index) {
          mEditingList.remove(adapter.getItem(index).toString());
        }
      }
      list.setAdapter(new ArrayAdapter<>(getActivity(),R.layout.wp_simple_list_item_1,mEditingList));
      return true;
    }
  }
);
  list.setEmptyView(view.findViewById(R.id.empty_view));
  list.setChoiceMode(AbsListView.CHOICE_MODE_MULTIPLE);
  list.setAdapter(new ArrayAdapter<>(getActivity(),R.layout.wp_simple_list_item_1,mEditingList));
  view.findViewById(R.id.fab_button).setOnClickListener(new View.OnClickListener(){
    @Override public void onClick(    View v){
      AlertDialog.Builder builder=new AlertDialog.Builder(getActivity(),R.style.Calypso_AlertDialog);
      final EditText input=new EditText(getActivity());
      WPPrefUtils.layoutAsInput(input);
      input.setHint(R.string.list_editor_input_hint);
      builder.setPositiveButton(R.string.ok,new DialogInterface.OnClickListener(){
        @Override public void onClick(        DialogInterface dialog,        int which){
          String entry=input.getText().toString();
          if (!mEditingList.contains(entry)) {
            mEditingList.add(entry);
            list.setAdapter(new ArrayAdapter<>(getActivity(),R.layout.wp_simple_list_item_1,mEditingList));
            AnalyticsUtils.trackWithCurrentBlogDetails(AnalyticsTracker.Stat.SETTINGS_ADDED_LIST_ITEM);
          }
        }
      }
);
      builder.setNegativeButton(R.string.cancel,null);
      AlertDialog alertDialog=builder.create();
      int spacing=getResources().getDimensionPixelSize(R.dimen.dlp_padding_start);
      alertDialog.setView(input,spacing,spacing,spacing,0);
      alertDialog.requestWindowFeature(Window.FEATURE_NO_TITLE);
      alertDialog.show();
      alertDialog.getWindow().setLayout(WindowManager.LayoutParams.MATCH_PARENT,WindowManager.LayoutParams.WRAP_CONTENT);
      Button positive=alertDialog.getButton(DialogInterface.BUTTON_POSITIVE);
      Button negative=alertDialog.getButton(DialogInterface.BUTTON_NEGATIVE);
      if (positive != null)       WPPrefUtils.layoutAsFlatButton(positive);
      if (negative != null)       WPPrefUtils.layoutAsFlatButton(negative);
    }
  }
);
  return view;
}

Fixed version (ground truth):
private View getListEditorView(final Dialog dialog,String footerText){
  ContextThemeWrapper wrapper=new ContextThemeWrapper(getActivity(),R.style.Calypso_SiteSettingsTheme);
  View view=View.inflate(wrapper,R.layout.list_editor,null);
  ((TextView)view.findViewById(R.id.list_editor_footer_text)).setText(footerText);
  final MultiSelectListView list=(MultiSelectListView)view.findViewById(android.R.id.list);
  list.setEnterMultiSelectListener(new MultiSelectListView.OnEnterMultiSelect(){
    @Override public void onEnterMultiSelect(){
      WPActivityUtils.setStatusBarColor(dialog.getWindow(),R.color.action_mode_status_bar_tint);
    }
  }
);
  list.setExitMultiSelectListener(new MultiSelectListView.OnExitMultiSelect(){
    @Override public void onExitMultiSelect(){
      WPActivityUtils.setStatusBarColor(dialog.getWindow(),R.color.status_bar_tint);
    }
  }
);
  list.setDeleteRequestListener(new MultiSelectListView.OnDeleteRequested(){
    @Override public boolean onDeleteRequested(){
      SparseBooleanArray checkedItems=list.getCheckedItemPositions();
      HashMap<String,Object> properties=new HashMap<>();
      properties.put("String_Node_Str",checkedItems.size());
      AnalyticsUtils.trackWithCurrentBlogDetails(AnalyticsTracker.Stat.SETTINGS_DELETED_LIST_ITEMS,properties);
      ListAdapter adapter=list.getAdapter();
      for (int i=0; i < checkedItems.size(); i++) {
        final int index=checkedItems.keyAt(i);
        if (checkedItems.get(index)) {
          mEditingList.remove(adapter.getItem(index).toString());
        }
      }
      list.setAdapter(new ArrayAdapter<>(getActivity(),R.layout.wp_simple_list_item_1,mEditingList));
      return true;
    }
  }
);
  list.setEmptyView(view.findViewById(R.id.empty_view));
  list.setChoiceMode(AbsListView.CHOICE_MODE_MULTIPLE);
  list.setAdapter(new ArrayAdapter<>(getActivity(),R.layout.wp_simple_list_item_1,mEditingList));
  view.findViewById(R.id.fab_button).setOnClickListener(new View.OnClickListener(){
    @Override public void onClick(    View v){
      AlertDialog.Builder builder=new AlertDialog.Builder(getActivity(),R.style.Calypso_AlertDialog);
      final EditText input=new EditText(getActivity());
      WPPrefUtils.layoutAsInput(input);
      input.setHint(R.string.list_editor_input_hint);
      builder.setPositiveButton(R.string.ok,new DialogInterface.OnClickListener(){
        @Override public void onClick(        DialogInterface dialog,        int which){
          String entry=input.getText().toString();
          if (!mEditingList.contains(entry)) {
            mEditingList.add(entry);
            list.setAdapter(new ArrayAdapter<>(getActivity(),R.layout.wp_simple_list_item_1,mEditingList));
            AnalyticsUtils.trackWithCurrentBlogDetails(AnalyticsTracker.Stat.SETTINGS_ADDED_LIST_ITEM);
          }
        }
      }
);
      builder.setNegativeButton(R.string.cancel,null);
      AlertDialog alertDialog=builder.create();
      int spacing=getResources().getDimensionPixelSize(R.dimen.dlp_padding_start);
      alertDialog.setView(input,spacing,spacing,spacing,0);
      alertDialog.requestWindowFeature(Window.FEATURE_NO_TITLE);
      alertDialog.show();
      alertDialog.getWindow().setLayout(WindowManager.LayoutParams.MATCH_PARENT,WindowManager.LayoutParams.WRAP_CONTENT);
      Button positive=alertDialog.getButton(DialogInterface.BUTTON_POSITIVE);
      Button negative=alertDialog.getButton(DialogInterface.BUTTON_NEGATIVE);
      if (positive != null)       WPPrefUtils.layoutAsFlatButton(positive);
      if (negative != null)       WPPrefUtils.layoutAsFlatButton(negative);
    }
  }
);
  return view;
}