Buggy code:
public class NavigationDrawerFragment extends Fragment implements View . OnClickListener { private static final String STATE_SELECTED_POSITION = "selected_navigation_drawer_position" ; private static final String PREF_USER_LEARNED_DRAWER = "navigation_drawer_learned" ; private ActionBarDrawerToggle mDrawerToggle ; private DrawerLayout mDrawerLayout ; private View layoutView ; private View mFragmentContainerView ; private int mCurrentSelectedPosition = 0 ; private boolean mFromSavedInstanceState ; private boolean mUserLearnedDrawer ; private ExpandableListView listView ; private ChannelsAdapter adapter ; private View settingView ; private View userView ; private View dayView ; private View nightView ; private ImageView avatarView ; private TextView userName ; private boolean loginState = false ; private boolean isFirstLoad = true ; public NavigationDrawerFragment ( ) { } @ Override public void onCreate ( Bundle savedInstanceState ) { } @ Override public void onActivityCreated ( Bundle savedInstanceState ) { } @ Override public View onCreateView ( LayoutInflater inflater , ViewGroup container , Bundle savedInstanceState ) { } public boolean isDrawerOpen ( ) { } public void setUp ( int fragmentId , DrawerLayout drawerLayout ) { } @ Override public void onDetach ( ) { } @ Override public void onSaveInstanceState ( Bundle outState ) { } @ Override public void onConfigurationChanged ( Configuration newConfig ) { } @ Override public void onCreateOptionsMenu ( Menu menu , MenuInflater inflater ) { } @ Override public boolean onOptionsItemSelected ( MenuItem item ) { } private void showGlobalContextActionBar ( ) { } private ActionBar getActionBar ( ) { } private final int Code_Login = 1033 ; private void onUserViewClicked ( ) { } private void revertMode ( ) { } @ Override public void onClick ( View v ) { } long currentDBVersion = - 1 ; @ Override public void onResume ( ) { super . onResume ( ) ; if ( isFirstLoad ) { if ( UserAPI . isLoggedIn ( ) ) { String nameString = SharedUtil . readString ( Key_User_Name , "" ) ; if ( ! ( TextUtils . isEmpty ( nameString ) ) ) { userName . setText ( nameString ) ; } String avatarString = SharedUtil . readString ( Key_User_Avatar , "" ) ; if ( ! ( TextUtils . isEmpty ( avatarString ) ) ) { Picasso . with ( getActivity ( ) ) . load ( avatarString ) . resizeDimen ( list_standard_comment_avatar_dimen , list_standard_comment_avatar_dimen ) . into ( avatarView ) ; } testLogin ( ) ; } isFirstLoad = false ; } else { if ( ( loginState ) != ( UserAPI . isLoggedIn ( ) ) ) { checkChannelList ( ) ; if ( UserAPI . isLoggedIn ( ) ) { loadUserInfo ( ) ; loginState = true ; } else { } } else { long lastDBVersion = SharedUtil . readLong ( Key_Last_Post_Groups_Version , 0 ) ; <START_BUG> if ( ( currentDBVersion ) != lastDBVersion ) { <END_BUG> ArrayList < SubItem > subItems = adapter . getSubLists ( ) . get ( 1 ) ; subItems . clear ( ) ; subItems . add ( new SubItem ( SubItem . Section_Post , SubItem . Type_Private_Channel , "我的小组" , "user_group" ) ) ; subItems . add ( new SubItem ( SubItem . Section_Post , SubItem . Type_Collections , "小组热贴" , "hot_posts" ) ) ; subItems . addAll ( GroupHelper . getSelectedGroupSubItems ( ) ) ; adapter . notifyDataSetChanged ( ) ; currentDBVersion = lastDBVersion ; } } } } private void checkChannelList ( ) { } private void testLogin ( ) { } private void loadUserInfo ( ) { } @ Override public void onActivityResult ( int requestCode , int resultCode , Intent data ) { } class TestLoginTask extends AsyncTask < Void , Integer , ResultObject > { @ Override protected ResultObject doInBackground ( Void ... params ) { } @ Override protected void onPostExecute ( ResultObject resultObject ) { } } class UserInfoTask extends AsyncTask < String , Intent , ResultObject > { @ Override protected ResultObject doInBackground ( String ... params ) { } @ Override protected void onPostExecute ( ResultObject resultObject ) { } } private void setupUserInfo ( UserInfo info ) { } }

Fix:
if ( ( ( currentDBVersion ) != lastDBVersion ) && ( ( GroupHelper . getMyGroupsNumber ( ) ) > 0 ) ) {