Program: 64787
Project: 64787
Buggy source:
@Override public void onActivityCreated(Bundle savedInstanceState){
  super.onActivityCreated(savedInstanceState);
  mCategorySub=new QueryCategorySubCategory(getActivity());
  mCategories=new ArrayList<TableCategory>();
  mSubCategories=new HashMap<TableCategory,List<QueryCategorySubCategory>>();
  if (savedInstanceState != null) {
    if (savedInstanceState.containsKey(KEY_ID_GROUP))     mIdGroupChecked=savedInstanceState.getInt(KEY_ID_GROUP);
    if (savedInstanceState.containsKey(KEY_ID_CHILD))     mIdChildChecked=savedInstanceState.getInt(KEY_ID_CHILD);
  }
  setShowMenuItemSearch(true);
  setEmptyText(getActivity().getResources().getString(R.string.category_empty_list));
  setHasOptionsMenu(true);
  mLayout=Intent.ACTION_PICK.equals(mAction) ? R.layout.simple_expandable_list_item_multiple_choice_2 : android.R.layout.simple_expandable_list_item_2;
  registerForContextMenu(getExpandableListView());
  getExpandableListView().setChoiceMode(ListView.CHOICE_MODE_SINGLE);
  setListShown(false);
  getExpandableListView().setOnChildClickListener(new OnChildClickListener(){
    @Override public boolean onChildClick(    ExpandableListView parent,    View v,    int groupPosition,    int childPosition,    long id){
      if (getExpandableListAdapter() != null && getExpandableListAdapter() instanceof CategoryExpandableListAdapter) {
        CategoryExpandableListAdapter adapter=(CategoryExpandableListAdapter)getExpandableListAdapter();
        QueryCategorySubCategory data=mSubCategories.get(mCategories.get(groupPosition)).get(childPosition);
        adapter.setIdChildChecked(data.getCategId(),data.getSubCategId());
        adapter.notifyDataSetChanged();
      }
      return false;
    }
  }
);
  getExpandableListView().setOnGroupClickListener(new OnGroupClickListener(){
    @Override public boolean onGroupClick(    ExpandableListView parent,    View v,    int groupPosition,    long id){
      if (getExpandableListAdapter() != null && getExpandableListAdapter() instanceof CategoryExpandableListAdapter) {
        CategoryExpandableListAdapter adapter=(CategoryExpandableListAdapter)getExpandableListAdapter();
        adapter.setIdGroupChecked(mCategories.get(groupPosition).getCategId());
        adapter.notifyDataSetChanged();
      }
      return false;
    }
  }
);
  getLoaderManager().initLoader(ID_LOADER_CATEGORYSUB,null,this);
}

Fixed version (ground truth):
@Override public void onActivityCreated(Bundle savedInstanceState){
  super.onActivityCreated(savedInstanceState);
  mCategorySub=new QueryCategorySubCategory(getActivity());
  mCategories=new ArrayList<TableCategory>();
  mSubCategories=new HashMap<TableCategory,List<QueryCategorySubCategory>>();
  if (savedInstanceState != null) {
    if (savedInstanceState.containsKey(KEY_ID_GROUP))     mIdGroupChecked=savedInstanceState.getInt(KEY_ID_GROUP);
    if (savedInstanceState.containsKey(KEY_ID_CHILD))     mIdChildChecked=savedInstanceState.getInt(KEY_ID_CHILD);
  }
  setShowMenuItemSearch(true);
  setEmptyText(getActivity().getResources().getString(R.string.category_empty_list));
  setHasOptionsMenu(true);
  if (Build.VERSION.SDK_INT < Build.VERSION_CODES.ICE_CREAM_SANDWICH) {
    mLayout=android.R.layout.simple_expandable_list_item_2;
  }
 else {
    mLayout=Intent.ACTION_PICK.equals(mAction) ? R.layout.simple_expandable_list_item_multiple_choice_2 : android.R.layout.simple_expandable_list_item_2;
  }
  registerForContextMenu(getExpandableListView());
  getExpandableListView().setChoiceMode(ListView.CHOICE_MODE_SINGLE);
  setListShown(false);
  if (Intent.ACTION_PICK.equals(mAction)) {
    getExpandableListView().setOnChildClickListener(new OnChildClickListener(){
      @Override public boolean onChildClick(      ExpandableListView parent,      View v,      int groupPosition,      int childPosition,      long id){
        if (getExpandableListAdapter() != null && getExpandableListAdapter() instanceof CategoryExpandableListAdapter) {
          CategoryExpandableListAdapter adapter=(CategoryExpandableListAdapter)getExpandableListAdapter();
          QueryCategorySubCategory data=mSubCategories.get(mCategories.get(groupPosition)).get(childPosition);
          adapter.setIdChildChecked(data.getCategId(),data.getSubCategId());
          adapter.notifyDataSetChanged();
        }
        return false;
      }
    }
);
    getExpandableListView().setOnGroupClickListener(new OnGroupClickListener(){
      @Override public boolean onGroupClick(      ExpandableListView parent,      View v,      int groupPosition,      long id){
        if (getExpandableListAdapter() != null && getExpandableListAdapter() instanceof CategoryExpandableListAdapter) {
          CategoryExpandableListAdapter adapter=(CategoryExpandableListAdapter)getExpandableListAdapter();
          adapter.setIdGroupChecked(mCategories.get(groupPosition).getCategId());
          adapter.notifyDataSetChanged();
        }
        return false;
      }
    }
);
  }
  getLoaderManager().initLoader(ID_LOADER_CATEGORYSUB,null,this);
}