Buggy code:
public class ViewActivity extends BaseActivity implements View . OnClickListener , ImgurListener , SideGalleryFragment . SideGalleryListener { private enum CommentSort { BEST ( "best" ) , NEW ( "new" ) , TOP ( "top" ) ; private final String mSort ; CommentSort ( String sort ) { } public String getSort ( ) { } public static ViewActivity . CommentSort getSortFromPosition ( int position ) { } public static String [ ] getItemsForArray ( Context context ) { } public static ViewActivity . CommentSort getSortFromString ( String item ) { } } private static final String DIALOG_LOADING = "loading" ; private static final String KEY_COMMENT = "comments" ; private static final String KEY_POSITION = "position" ; private static final String KEY_OBJECTS = "objects" ; private static final String KEY_SORT = "commentSort" ; private static final String KEY_LOAD_COMMENTS = "autoLoadComments" ; @ InjectView ( id . pager ) ViewPager mViewPager ; @ InjectView ( id . sliding_layout ) SlidingUpPanelLayout mSlidingPane ; @ InjectView ( id . multiView ) MultiStateView mMultiView ; @ InjectView ( id . commentList ) ListView mCommentList ; @ InjectView ( id . panelUpBtn ) ImageButton mPanelButton ; @ InjectView ( id . upVoteBtn ) ImageButton mUpVoteBtn ; @ InjectView ( id . downVoteBtn ) ImageButton mDownVoteBtn ; private CommentAdapter mCommentAdapter ; private TextViewRoboto mCommentListHeader ; private LongSparseArray < ArrayList < ImgurComment > > mCommentArray = new LongSparseArray ( ) ; private LongSparseArray < Integer > mPreviousCommentPositionArray = new LongSparseArray ( ) ; private int mCurrentPosition = 0 ; private ApiClient mApiClient ; private boolean mIsActionBarShowing = true ; private ImgurComment mSelectedComment ; private String mGalleryId = null ; private boolean mIsResuming = false ; private boolean mLoadComments ; private boolean mIsCommentsAnimating = false ; private ViewActivity . BrowsingAdapter mPagerAdapter ; private ViewActivity . CommentSort mCommentSort ; private SideGalleryFragment mSideGalleryFragment ; public static Intent createIntent ( Context context , ArrayList < ImgurBaseObject > objects , int position ) { } public static Intent createIntent ( Context context , String url ) { } @ Override protected void onCreate ( Bundle savedInstanceState ) { } private void initSlidingView ( ) { } private void handleIntent ( Intent intent , Bundle savedInstanceState ) { } private void loadComments ( ) { } private void nextComments ( final ImgurComment comment ) { } private void previousComments ( final ImgurComment comment ) { } @ Override public void onBackPressed ( ) { } @ Override protected void onPostCreate ( Bundle savedInstanceState ) { } @ Override protected void onResume ( ) { } @ Override protected void onPause ( ) { } @ Override protected void onDestroy ( ) { } @ OnClick ( { id . panelUpBtn , id . upVoteBtn , id . downVoteBtn , id . commentBtn , id . sortComments , id . errorButton } ) @ Override public void onClick ( View view ) { } public void onEventAsync ( @ NonNull ImgurBusEvent event ) { } public void onEventMainThread ( ThrowableFailureEvent event ) { } @ Override public void onPhotoTap ( View View ) { } @ Override public void onPhotoLongTapListener ( View View ) { } @ Override public void onPlayTap ( final ProgressBar prog , final ImageButton play , final ImageView image , final VideoView video ) { } @ Override public void onLinkTap ( View view , String url ) { } @ Override public void onViewRepliesTap ( View view ) { } @ Override public void onItemSelected ( int position ) { } @ Override public boolean onCreateOptionsMenu ( Menu menu ) { } @ Override public boolean onOptionsItemSelected ( MenuItem item ) { } @ Override public boolean onPrepareOptionsMenu ( Menu menu ) { } private void updateShareProvider ( ShareActionProvider provider , ImgurBaseObject imgurBaseObject ) { } @ Override protected void onSaveInstanceState ( Bundle outState ) { super . onSaveInstanceState ( outState ) ; if ( ( mCommentArray . size ( ) ) > 0 ) { long key = mCommentArray . keyAt ( 0 ) ; outState . putParcelableArrayList ( ViewActivity . KEY_COMMENT , mCommentArray . get ( key ) ) ; } else <START_BUG> if ( ! ( mCommentAdapter . isEmpty ( ) ) ) { <END_BUG> outState . putParcelableArrayList ( ViewActivity . KEY_COMMENT , mCommentAdapter . retainItems ( ) ) ; } outState . putBoolean ( ViewActivity . KEY_LOAD_COMMENTS , mLoadComments ) ; outState . putString ( ViewActivity . KEY_SORT , mCommentSort . getSort ( ) ) ; if ( ( ( mPagerAdapter ) != null ) && ( ! ( mPagerAdapter . isEmpty ( ) ) ) ) { outState . putInt ( ViewActivity . KEY_POSITION , mViewPager . getCurrentItem ( ) ) ; outState . putParcelableArrayList ( ViewActivity . KEY_OBJECTS , mPagerAdapter . retainItems ( ) ) ; } } private void onListItemClick ( int position ) { } private void showCommentSheet ( ) { } private ImgurHandler mHandler = new ImgurHandler ( ) { @ Override public void handleMessage ( Message msg ) { } } ; private static class ZoomOutPageTransformer implements ViewPager . PageTransformer { private static final float MIN_SCALE = 0.5F ; private static final float MIN_ALPHA = 1.0F ; public void transformPage ( View view , float position ) { } } private static class BrowsingAdapter extends FragmentStatePagerAdapter { private ArrayList < ImgurBaseObject > objects ; public BrowsingAdapter ( FragmentManager fm , ArrayList < ImgurBaseObject > objects ) { } @ Override public Fragment getItem ( int position ) { } @ Override public int getCount ( ) { } public ImgurBaseObject getImgurItem ( int position ) { } public void clear ( ) { } public boolean isEmpty ( ) { } public ArrayList < ImgurBaseObject > retainItems ( ) { } } }

Fix:
if ( ( ( mCommentAdapter ) != null ) && ( ! ( mCommentAdapter . isEmpty ( ) ) ) ) {