Buggy code:
public class TKNavigationDrawer extends DrawerLayout { private MainActivity mainActivity ; private ActionBarDrawerToggle drawerToggle ; private int drawerContainerRes ; private ListView lvDrawer ; private Toolbar toolbar ; private ArrayList < NavDrawerItem > navDrawerItems ; private ArrayList < TKNavigationDrawer . FragmentNavItem > drawerNavItems ; private TKDrawerListAdapter drawerAdapter ; public TKNavigationDrawer ( Context context ) { } public TKNavigationDrawer ( Context context , AttributeSet attrs ) { } public TKNavigationDrawer ( Context context , AttributeSet attrs , int defStyle ) { } public void setupDrawerConfiguration ( ListView drawerListView , Toolbar drawerToolbar , int drawerContainerResId , MainActivity parentMain ) { } private ActionBarDrawerToggle setupDrawerToggle ( ) { } public void addNavItem ( String navTitle , int icon , String windowTitle , Class < ? extends Fragment > fragmentClass ) { } public void addNavItem ( String navTitle , int icon , String windowTitle , Class < ? extends Fragment > fragmentClass , boolean showToolbar ) { } public void addNavItem ( String navTitle , int icon , String windowTitle , Class < ? extends Fragment > fragmentClass , boolean showToolbar , boolean visible ) { } public void selectDrawerItem ( int position ) { } public void selectDrawerItem ( int position , Bundle args ) { } public void renderFragment ( Class < ? extends Fragment > newFragment , Bundle args ) { Fragment fragment = null ; try { fragment = newFragment . newInstance ( ) ; if ( args != null ) { fragment . setArguments ( args ) ; } if ( fragment != null ) { FragmentManager fragmentManager = getActivity ( ) . getSupportFragmentManager ( ) ; <START_BUG> fragmentManager . beginTransaction ( ) . setCustomAnimations ( slide_in_right_ , slide_out_left , slide_in_left , slide_out_right ) . replace ( drawerContainerRes , fragment ) . addToBackStack ( null ) . commit ( ) ; <END_BUG> } } catch ( Exception e ) { } } public boolean isDrawerOpen ( ) { } public ActionBarDrawerToggle getDrawerToggle ( ) { } public void setTitle ( CharSequence title ) { } private FragmentActivity getActivity ( ) { } private ActionBar getSupportActionBar ( ) { } private class FragmentDrawerItemListener implements ListView . OnItemClickListener { @ Override public void onItemClick ( AdapterView < ? > parent , View view , int position , long id ) { } } private class FragmentNavItem { private Class < ? extends Fragment > fragmentClass ; private boolean showToolbar ; private boolean visibleInDrawer ; private String title ; private Bundle fragmentArgs ; public FragmentNavItem ( String title , Class < ? extends Fragment > fragmentClass ) { } public FragmentNavItem ( String title , Class < ? extends Fragment > fragmentClass , Bundle args ) { } public FragmentNavItem ( String title , Class < ? extends Fragment > fragmentClass , Bundle args , boolean showToolbar ) { } public FragmentNavItem ( String title , Class < ? extends Fragment > fragmentClass , Bundle args , boolean showToolbar , boolean visibleInDrawer ) { } public Class < ? extends Fragment > getFragmentClass ( ) { } public String getTitle ( ) { } public Bundle getFragmentArgs ( ) { } public boolean isShowToolbar ( ) { } public boolean isVisibleInDrawer ( ) { } } }

Fix:
fragmentManager . beginTransaction ( ) . setCustomAnimations ( slide_in_right_ , slide_out_left , slide_in_left , slide_out_right ) . replace ( drawerContainerRes , fragment ) . commit ( ) ;