Program: 52636
Project: 52636
Buggy source:
@TargetApi(Build.VERSION_CODES.ICE_CREAM_SANDWICH) @Override protected void onCreate(Bundle savedInstanceState){
  Log.d(TAG,"String_Node_Str");
  super.onCreate(savedInstanceState);
  setContentView(R.layout.activity_task_list);
  mAuthority=getString(R.string.org_dmfs_tasks_authority);
  mSearchHistoryHelper=new SearchHistoryHelper(this);
  if (findViewById(R.id.task_detail_container) != null) {
    mTwoPane=true;
    mTaskDetailFrag=new ViewTaskFragment();
    getSupportFragmentManager().beginTransaction().replace(R.id.task_detail_container,mTaskDetailFrag).commit();
  }
  mGroupingFactories=new AbstractGroupingFactory[]{new ByList(mAuthority),new ByDueDate(mAuthority),new ByStartDate(mAuthority),new ByPriority(mAuthority),new ByProgress(mAuthority),new BySearch(mAuthority,mSearchHistoryHelper)};
  try {
    mPagerAdapter=new TaskGroupPagerAdapter(getSupportFragmentManager(),mGroupingFactories,this,R.xml.listview_tabs);
  }
 catch (  XmlPullParserException e) {
    e.printStackTrace();
  }
catch (  IOException e) {
    e.printStackTrace();
  }
catch (  XmlObjectPullParserException e) {
    e.printStackTrace();
  }
  mPagerAdapter.setTwoPaneLayout(mTwoPane);
  mViewPager=(ViewPager)findViewById(R.id.pager);
  mViewPager.setAdapter(mPagerAdapter);
  int currentPageIndex=mPagerAdapter.getPagePosition(mCurrentPageId);
  if (currentPageIndex >= 0) {
    mViewPager.setCurrentItem(currentPageIndex);
    if (VERSION.SDK_INT >= 14 && mCurrentPageId == R.id.task_group_search) {
      if (mSearchItem != null) {
        MenuItemCompat.expandActionView(mSearchItem);
      }
 else {
        mAutoExpandSearchView=true;
      }
    }
  }
  updateTitle(currentPageIndex);
  mTabs=(PagerSlidingTabStrip)findViewById(R.id.tabs);
  mTabs.setViewPager(mViewPager);
  mTabs.setOnPageChangeListener(new OnPageChangeListener(){
    @Override public void onPageSelected(    int position){
      int newPageId=mPagerAdapter.getPageId(position);
      if (newPageId == R.id.task_group_search) {
        int oldPageId=mCurrentPageId;
        mCurrentPageId=newPageId;
        MenuItemCompat.expandActionView(mSearchItem);
        mPreviousPagePosition=mPagerAdapter.getPagePosition(oldPageId);
      }
 else       if (mCurrentPageId == R.id.task_group_search) {
        mSearchHistoryHelper.commitSearch();
        mHandler.post(mSearchUpdater);
        mCurrentPageId=newPageId;
        hideSearchActionView();
      }
      mCurrentPageId=newPageId;
      updateTitle(mCurrentPageId);
    }
    @Override public void onPageScrolled(    int position,    float positionOffset,    int positionOffsetPixels){
    }
    @Override public void onPageScrollStateChanged(    int position){
    }
  }
);
}

Fixed version (ground truth):
@TargetApi(Build.VERSION_CODES.ICE_CREAM_SANDWICH) @Override protected void onCreate(Bundle savedInstanceState){
  Log.d(TAG,"String_Node_Str");
  super.onCreate(savedInstanceState);
  setContentView(R.layout.activity_task_list);
  mAuthority=getString(R.string.org_dmfs_tasks_authority);
  mSearchHistoryHelper=new SearchHistoryHelper(this);
  if (findViewById(R.id.task_detail_container) != null) {
    mTwoPane=true;
    mTaskDetailFrag=new ViewTaskFragment();
    getSupportFragmentManager().beginTransaction().replace(R.id.task_detail_container,mTaskDetailFrag).commit();
  }
  mGroupingFactories=new AbstractGroupingFactory[]{new ByList(mAuthority),new ByDueDate(mAuthority),new ByStartDate(mAuthority),new ByPriority(mAuthority),new ByProgress(mAuthority),new BySearch(mAuthority,mSearchHistoryHelper)};
  try {
    mPagerAdapter=new TaskGroupPagerAdapter(getSupportFragmentManager(),mGroupingFactories,this,R.xml.listview_tabs);
  }
 catch (  XmlPullParserException e) {
    e.printStackTrace();
  }
catch (  IOException e) {
    e.printStackTrace();
  }
catch (  XmlObjectPullParserException e) {
    e.printStackTrace();
  }
  mPagerAdapter.setTwoPaneLayout(mTwoPane);
  mViewPager=(ViewPager)findViewById(R.id.pager);
  mViewPager.setAdapter(mPagerAdapter);
  int currentPageIndex=mPagerAdapter.getPagePosition(mCurrentPageId);
  if (currentPageIndex >= 0) {
    mViewPager.setCurrentItem(currentPageIndex);
    if (VERSION.SDK_INT >= 14 && mCurrentPageId == R.id.task_group_search) {
      if (mSearchItem != null) {
        MenuItemCompat.expandActionView(mSearchItem);
      }
 else {
        mAutoExpandSearchView=true;
      }
    }
  }
  updateTitle(currentPageIndex);
  mTabs=(PagerSlidingTabStrip)findViewById(R.id.tabs);
  mTabs.setViewPager(mViewPager);
  mTabs.setOnPageChangeListener(new OnPageChangeListener(){
    @Override public void onPageSelected(    int position){
      int newPageId=mPagerAdapter.getPageId(position);
      if (newPageId == R.id.task_group_search) {
        int oldPageId=mCurrentPageId;
        mCurrentPageId=newPageId;
        mPreviousPagePosition=mPagerAdapter.getPagePosition(oldPageId);
      }
 else       if (mCurrentPageId == R.id.task_group_search) {
        mSearchHistoryHelper.commitSearch();
        mHandler.post(mSearchUpdater);
        mCurrentPageId=newPageId;
        hideSearchActionView();
      }
      mCurrentPageId=newPageId;
      updateTitle(mCurrentPageId);
    }
    @Override public void onPageScrolled(    int position,    float positionOffset,    int positionOffsetPixels){
    }
    @Override public void onPageScrollStateChanged(    int state){
      if (state == ViewPager.SCROLL_STATE_IDLE && mCurrentPageId == R.id.task_group_search) {
        mHandler.post(new Runnable(){
          @Override public void run(){
            MenuItemCompat.expandActionView(mSearchItem);
          }
        }
);
      }
    }
  }
);
}