Program: 191442
Project: 191442
Buggy source:
private void createListView(final AlertController dialog){
  final RecycleListView listView=(RecycleListView)mInflater.inflate(dialog.mListLayout,null);
  final ListAdapter adapter;
  if (mIsMultiChoice) {
    if (mCursor == null) {
      adapter=new ArrayAdapter<CharSequence>(mContext,dialog.mMultiChoiceItemLayout,R.id.text1,mItems){
        @Override public View getView(        int position,        View convertView,        ViewGroup parent){
          View view=super.getView(position,convertView,parent);
          if (mCheckedItems != null) {
            boolean isItemChecked=mCheckedItems[position];
            if (isItemChecked) {
              listView.setItemChecked(position,true);
            }
          }
          return view;
        }
      }
;
    }
 else {
      adapter=new CursorAdapter(mContext,mCursor,false){
        private final int mLabelIndex;
        private final int mIsCheckedIndex;
{
          final Cursor cursor=getCursor();
          mLabelIndex=cursor.getColumnIndexOrThrow(mLabelColumn);
          mIsCheckedIndex=cursor.getColumnIndexOrThrow(mIsCheckedColumn);
        }
        @Override public void bindView(        View view,        Context context,        Cursor cursor){
          CheckedTextView text=(CheckedTextView)view.findViewById(R.id.text1);
          text.setText(cursor.getString(mLabelIndex));
          listView.setItemChecked(cursor.getPosition(),cursor.getInt(mIsCheckedIndex) == 1);
        }
        @Override public View newView(        Context context,        Cursor cursor,        ViewGroup parent){
          return mInflater.inflate(dialog.mMultiChoiceItemLayout,parent,false);
        }
      }
;
    }
  }
 else {
    final int layout;
    if (mIsSingleChoice) {
      layout=dialog.mSingleChoiceItemLayout;
    }
 else {
      layout=dialog.mListItemLayout;
    }
    if (mCursor != null) {
      adapter=new SimpleCursorAdapter(mContext,layout,mCursor,new String[]{mLabelColumn},new int[]{R.id.text1});
    }
 else     if (mAdapter != null) {
      adapter=mAdapter;
    }
 else {
      adapter=new CheckedItemAdapter(mContext,layout,R.id.text1,mItems);
    }
  }
  if (mOnPrepareListViewListener != null) {
    mOnPrepareListViewListener.onPrepareListView(listView);
  }
  dialog.mAdapter=adapter;
  dialog.mCheckedItem=mCheckedItem;
  if (mOnClickListener != null) {
    listView.setOnItemClickListener(new OnItemClickListener(){
      @Override public void onItemClick(      AdapterView<?> parent,      View v,      int position,      long id){
        position-=listView.getHeaderViewsCount();
        mOnClickListener.onClick(dialog.mDialogInterface,position);
        if (!mIsSingleChoice) {
          dialog.mDialogInterface.dismiss();
        }
      }
    }
);
  }
 else   if (mOnCheckboxClickListener != null) {
    listView.setOnItemClickListener(new OnItemClickListener(){
      @Override public void onItemClick(      AdapterView<?> parent,      View v,      int position,      long id){
        position-=listView.getHeaderViewsCount();
        if (mCheckedItems != null) {
          mCheckedItems[position]=listView.isItemChecked(position);
        }
        mOnCheckboxClickListener.onClick(dialog.mDialogInterface,position,listView.isItemChecked(position));
      }
    }
);
  }
  if (mOnItemSelectedListener != null) {
    listView.setOnItemSelectedListener(mOnItemSelectedListener);
  }
  if (mIsSingleChoice) {
    listView.setChoiceMode(ListView.CHOICE_MODE_SINGLE);
  }
 else   if (mIsMultiChoice) {
    listView.setChoiceMode(ListView.CHOICE_MODE_MULTIPLE);
  }
  listView.mRecycleOnMeasure=mRecycleOnMeasure;
  dialog.mListView=listView;
}

Fixed version (ground truth):
private void createListView(final AlertController dialog){
  final RecycleListView listView=(RecycleListView)mInflater.inflate(dialog.mListLayout,null);
  final ListAdapter adapter;
  if (mIsMultiChoice) {
    if (mCursor == null) {
      adapter=new ArrayAdapter<CharSequence>(mContext,dialog.mMultiChoiceItemLayout,R.id.text1,mItems){
        @Override public View getView(        int position,        View convertView,        ViewGroup parent){
          View view=super.getView(position,convertView,parent);
          if (mCheckedItems != null) {
            boolean isItemChecked=mCheckedItems[position];
            if (isItemChecked) {
              listView.setItemChecked(position + listView.getHeaderViewsCount(),true);
            }
          }
          return view;
        }
      }
;
    }
 else {
      adapter=new CursorAdapter(mContext,mCursor,false){
        private final int mLabelIndex;
        private final int mIsCheckedIndex;
{
          final Cursor cursor=getCursor();
          mLabelIndex=cursor.getColumnIndexOrThrow(mLabelColumn);
          mIsCheckedIndex=cursor.getColumnIndexOrThrow(mIsCheckedColumn);
        }
        @Override public void bindView(        View view,        Context context,        Cursor cursor){
          CheckedTextView text=(CheckedTextView)view.findViewById(R.id.text1);
          text.setText(cursor.getString(mLabelIndex));
          listView.setItemChecked(cursor.getPosition() + listView.getHeaderViewsCount(),cursor.getInt(mIsCheckedIndex) == 1);
        }
        @Override public View newView(        Context context,        Cursor cursor,        ViewGroup parent){
          return mInflater.inflate(dialog.mMultiChoiceItemLayout,parent,false);
        }
      }
;
    }
  }
 else {
    final int layout;
    if (mIsSingleChoice) {
      layout=dialog.mSingleChoiceItemLayout;
    }
 else {
      layout=dialog.mListItemLayout;
    }
    if (mCursor != null) {
      adapter=new SimpleCursorAdapter(mContext,layout,mCursor,new String[]{mLabelColumn},new int[]{R.id.text1});
    }
 else     if (mAdapter != null) {
      adapter=mAdapter;
    }
 else {
      adapter=new CheckedItemAdapter(mContext,layout,R.id.text1,mItems);
    }
  }
  if (mOnPrepareListViewListener != null) {
    mOnPrepareListViewListener.onPrepareListView(listView);
  }
  dialog.mAdapter=adapter;
  dialog.mCheckedItem=mCheckedItem;
  if (mOnClickListener != null) {
    listView.setOnItemClickListener(new OnItemClickListener(){
      @Override public void onItemClick(      AdapterView<?> parent,      View v,      int position,      long id){
        position-=listView.getHeaderViewsCount();
        mOnClickListener.onClick(dialog.mDialogInterface,position);
        if (!mIsSingleChoice) {
          dialog.mDialogInterface.dismiss();
        }
      }
    }
);
  }
 else   if (mOnCheckboxClickListener != null) {
    listView.setOnItemClickListener(new OnItemClickListener(){
      @Override public void onItemClick(      AdapterView<?> parent,      View v,      int position,      long id){
        position-=listView.getHeaderViewsCount();
        if (mCheckedItems != null) {
          mCheckedItems[position]=listView.isItemChecked(position);
        }
        mOnCheckboxClickListener.onClick(dialog.mDialogInterface,position,listView.isItemChecked(position));
      }
    }
);
  }
  if (mOnItemSelectedListener != null) {
    listView.setOnItemSelectedListener(mOnItemSelectedListener);
  }
  if (mIsSingleChoice) {
    listView.setChoiceMode(ListView.CHOICE_MODE_SINGLE);
  }
 else   if (mIsMultiChoice) {
    listView.setChoiceMode(ListView.CHOICE_MODE_MULTIPLE);
  }
  listView.mRecycleOnMeasure=mRecycleOnMeasure;
  dialog.mListView=listView;
}