Buggy code:
public class MainActivity extends ActionBarActivity implements AdapterView . OnItemClickListener , ToolbarManager . OnToolbarGroupChangedListener { private DrawerLayout dl_navigator ; private FrameLayout fl_drawer ; private ListView lv_drawer ; private ViewPager vp ; private TabPageIndicator tpi ; private MainActivity . DrawerAdapter mDrawerAdapter ; private MainActivity . PagerAdapter mPagerAdapter ; private Toolbar mToolbar ; private ToolbarManager mToolbarManager ; private SnackBar mSnackBar ; private MainActivity . Tab [ ] mItems = new MainActivity . Tab [ ] { MainActivity . Tab . PROGRESS , MainActivity . Tab . BUTTONS , MainActivity . Tab . SWITCHES , MainActivity . Tab . TEXTFIELDS , MainActivity . Tab . SNACKBARS , MainActivity . Tab . DIALOGS } ; @ Override protected void onCreate ( Bundle savedInstanceState ) { super . onCreate ( savedInstanceState ) ; setContentView ( activity_main ) ; dl_navigator = ( ( DrawerLayout ) ( findViewById ( main_dl ) ) ) ; fl_drawer = ( ( FrameLayout ) ( findViewById ( main_fl_drawer ) ) ) ; lv_drawer = ( ( ListView ) ( findViewById ( main_lv_drawer ) ) ) ; mToolbar = ( ( Toolbar ) ( findViewById ( main_toolbar ) ) ) ; vp = ( ( ViewPager ) ( findViewById ( main_vp ) ) ) ; tpi = ( ( TabPageIndicator ) ( findViewById ( main_tpi ) ) ) ; mSnackBar = ( ( SnackBar ) ( findViewById ( main_sn ) ) ) ; mToolbarManager = new ToolbarManager ( this , mToolbar , 0 , style . ToolbarRippleStyle , anim . abc_fade_in , anim . abc_fade_out ) ; mToolbarManager . setNavigationManager ( new ToolbarManager . BaseNavigationManager ( style . NavigationDrawerDrawable , this , mToolbar , dl_navigator ) { @ Override public void onNavigationClick ( ) { if ( ( mToolbarManager . getCurrentGroup ( ) ) != 0 ) mToolbarManager . setCurrentGroup ( 0 ) ; else dl_navigator . openDrawer ( START ) ; } @ Override public boolean isBackState ( ) { return ( super . isBackState ( ) ) || ( ( mToolbarManager . getCurrentGroup ( ) ) != 0 ) ; } @ Override protected boolean shouldSyncDrawerSlidingProgress ( ) { return ( super . shouldSyncDrawerSlidingProgress ( ) ) && ( ( mToolbarManager . getCurrentGroup ( ) ) == 0 ) ; } } ) ; mToolbarManager . registerOnToolbarGroupChangedListener ( this ) ; mDrawerAdapter = new MainActivity . DrawerAdapter ( ) ; lv_drawer . setAdapter ( mDrawerAdapter ) ; lv_drawer . setOnItemClickListener ( this ) ; mPagerAdapter = new MainActivity . PagerAdapter ( getSupportFragmentManager ( ) , mItems ) ; vp . setAdapter ( mPagerAdapter ) ; tpi . setViewPager ( vp ) ; tpi . setOnPageChangeListener ( new ViewPager . OnPageChangeListener ( ) { @ Override public void onPageSelected ( int position ) { mDrawerAdapter . setSelected ( mItems [ position ] ) ; mSnackBar . dismiss ( ) ; } @ Override public void onPageScrolled ( int arg0 , float arg1 , int arg2 ) { } @ Override public void onPageScrollStateChanged ( int state ) { } } ) ; <START_BUG> vp . setCurrentItem ( 3 ) ; <END_BUG> } @ Override public boolean onCreateOptionsMenu ( Menu menu ) { } @ Override public boolean onPrepareOptionsMenu ( Menu menu ) { } @ Override public boolean onOptionsItemSelected ( MenuItem item ) { } @ Override public void onToolbarGroupChanged ( int oldGroupId , int groupId ) { } @ Override public void onItemClick ( AdapterView < ? > parent , View view , int position , long id ) { } public SnackBar getSnackBar ( ) { } public enum Tab { PROGRESS ( "Progresses" ) , BUTTONS ( "Buttons" ) , SWITCHES ( "Switches" ) , TEXTFIELDS ( "Textfields" ) , SNACKBARS ( "Snackbars" ) , DIALOGS ( "Dialogs" ) ; private final String name ; private Tab ( String s ) { } public boolean equalsName ( String otherName ) { } public String toString ( ) { } } class DrawerAdapter extends BaseAdapter { private MainActivity . Tab mSelectedTab ; public void setSelected ( MainActivity . Tab tab ) { } public MainActivity . Tab getSelectedTab ( ) { } @ Override public int getCount ( ) { } @ Override public Object getItem ( int position ) { } @ Override public long getItemId ( int position ) { } @ Override public View getView ( int position , View convertView , ViewGroup parent ) { } } private static class PagerAdapter extends FragmentStatePagerAdapter { Fragment [ ] mFragments = new Fragment [ 3 ] ; MainActivity . Tab [ ] mTabs ; private static final Field sActiveField ; public PagerAdapter ( FragmentManager fm , MainActivity . Tab [ ] tabs ) { } private void setFragment ( MainActivity . Tab tab , Fragment f ) { } @ Override public Fragment getItem ( int position ) { } @ Override public CharSequence getPageTitle ( int position ) { } @ Override public int getCount ( ) { } } }

Fix:
vp . setCurrentItem ( 0 ) ;