Buggy code:
public class UltimateRecyclerView extends FrameLayout implements Scrollable { public RecyclerView mRecyclerView ; protected FloatingActionButton defaultFloatingActionButton ; private UltimateRecyclerView . OnLoadMoreListener onLoadMoreListener ; private int lastVisibleItemPosition ; protected OnScrollListener mOnScrollListener ; protected UltimateRecyclerView . LAYOUT_MANAGER_TYPE layoutManagerType ; private boolean isLoadingMore = false ; protected int mPadding ; protected int mPaddingTop ; protected int mPaddingBottom ; protected int mPaddingLeft ; protected int mPaddingRight ; protected boolean mClipToPadding ; private UltimateViewAdapter mAdapter ; private int mPrevFirstVisiblePosition ; private int mPrevFirstVisibleChildHeight = - 1 ; private int mPrevScrolledChildrenHeight ; private int mPrevScrollY ; private int mScrollY ; private SparseIntArray mChildrenHeights = new SparseIntArray ( ) ; private ObservableScrollState mObservableScrollState ; private ObservableScrollViewCallbacks mCallbacks ; private boolean mFirstScroll ; private boolean mDragging ; private boolean mIntercepted ; private MotionEvent mPrevMoveEvent ; private ViewGroup mTouchInterceptionViewGroup ; protected ViewStub mEmpty ; protected View mEmptyView ; protected int mEmptyId ; protected ViewStub mFloatingButtonViewStub ; protected View mFloatingButtonView ; protected int mFloatingButtonId ; protected int [ ] defaultSwipeToDismissColors = null ; public int showLoadMoreItemNum = 3 ; public VerticalSwipeRefreshLayout mSwipeRefreshLayout ; private static final int SCROLLBARS_NONE = 0 ; private static final int SCROLLBARS_VERTICAL = 1 ; private static final int SCROLLBARS_HORIZONTAL = 2 ; private int mScrollbarsStyle ; private int mVisibleItemCount = 0 ; private int mTotalItemCount = 0 ; private int previousTotal = 0 ; private int mFirstVisibleItem ; public UltimateRecyclerView ( Context context ) { } public UltimateRecyclerView ( Context context , AttributeSet attrs ) { } public UltimateRecyclerView ( Context context , AttributeSet attrs , int defStyleAttr ) { } public void setRecylerViewBackgroundColor ( int color ) { } protected void initViews ( ) { } public void setEmptyView ( int emptyResourceId ) { } public void showEmptyView ( ) { } public void hideEmptyView ( ) { } public void showFloatingButtonView ( ) { } protected void setScrollbars ( ) { } protected void initAttrs ( AttributeSet attrs ) { } protected void setDefaultScrollListener ( ) { } private void setObserableScrollListener ( ) { } public void enableLoadmore ( ) { } public void disableLoadmore ( ) { } protected void enableShoworHideToolbarAndFloatingButton ( RecyclerView recyclerView ) { } public void setOnScrollListener ( RecyclerView . OnScrollListener customOnScrollListener ) { } public void addOnScrollListener ( RecyclerView . OnScrollListener customOnScrollListener ) { } public void removeOnScrollListener ( RecyclerView . OnScrollListener customOnScrollListener ) { } public void addItemDividerDecoration ( Context context ) { } public void swapAdapter ( UltimateViewAdapter adapter , boolean removeAndRecycleExistingViews ) { } public void addItemDecoration ( RecyclerView . ItemDecoration itemDecoration ) { } public void addItemDecoration ( RecyclerView . ItemDecoration itemDecoration , int index ) { } public void setItemAnimator ( RecyclerView . ItemAnimator animator ) { } public ItemAnimator getItemAnimator ( ) { } public void setDefaultOnRefreshListener ( SwipeRefreshLayout . OnRefreshListener listener ) { } public void setDefaultSwipeToRefreshColorScheme ( int ... colors ) { } public void setOnLoadMoreListener ( UltimateRecyclerView . OnLoadMoreListener onLoadMoreListener ) { } public void setLayoutManager ( RecyclerView . LayoutManager manager ) { } public Adapter getAdapter ( ) { } public void setAdapter ( UltimateViewAdapter adapter ) { } private void updateHelperDisplays ( ) { isLoadingMore = false ; if ( ( mSwipeRefreshLayout ) != null ) mSwipeRefreshLayout . setRefreshing ( false ) ; if ( ( mAdapter ) == null ) return ; if ( ( mAdapter . getAdapterItemCount ( ) ) == 0 ) { <START_BUG> mEmpty . setVisibility ( ( ( mEmptyId ) == 0 ? View . VISIBLE : View . GONE ) ) ; <END_BUG> } if ( ( mAdapter . getCustomLoadMoreView ( ) ) == null ) return ; if ( ( ( mAdapter . getAdapterItemCount ( ) ) >= ( showLoadMoreItemNum ) ) && ( ( mAdapter . getCustomLoadMoreView ( ) . getVisibility ( ) ) == ( View . GONE ) ) ) { mAdapter . getCustomLoadMoreView ( ) . setVisibility ( VISIBLE ) ; } if ( ( mAdapter . getAdapterItemCount ( ) ) < ( showLoadMoreItemNum ) ) { mAdapter . getCustomLoadMoreView ( ) . setVisibility ( GONE ) ; } } @ Deprecated public void setAdapter ( RecyclerView . Adapter adapter ) { } public void setHasFixedSize ( boolean hasFixedSize ) { } public void setRefreshing ( boolean refreshing ) { } public void enableDefaultSwipeRefresh ( boolean isSwipeRefresh ) { } public interface OnLoadMoreListener { void loadMore ( int itemsCount , final int maxLastVisiblePosition ) { } } public static enum LAYOUT_MANAGER_TYPE { LINEAR , GRID , STAGGERED_GRID ; } private int findMax ( int [ ] lastPositions ) { } private int findMin ( int [ ] lastPositions ) { } private UltimateRecyclerView . CustomRelativeWrapper mHeader ; private int mTotalYScrolled ; private final float SCROLL_MULTIPLIER = 0.5F ; private UltimateRecyclerView . OnParallaxScroll mParallaxScroll ; private static boolean isParallaxHeader = false ; public void setParallaxHeader ( View header ) { } public void setNormalHeader ( View header ) { } public void setOnParallaxScroll ( UltimateRecyclerView . OnParallaxScroll parallaxScroll ) { } private void translateHeader ( float of ) { } public interface OnParallaxScroll { void onParallaxScroll ( float percentage , float offset , View parallax ) { } } public static class CustomRelativeWrapper extends RelativeLayout { private int mOffset ; public CustomRelativeWrapper ( Context context ) { } @ Override protected void dispatchDraw ( Canvas canvas ) { } public void setClipY ( int offset ) { } } public void setScrollViewCallbacks ( ObservableScrollViewCallbacks listener ) { } @ Override public void onRestoreInstanceState ( Parcelable state ) { } @ Override public Parcelable onSaveInstanceState ( ) { } @ Override public boolean onInterceptTouchEvent ( MotionEvent ev ) { } @ Override public void setTouchInterceptionViewGroup ( ViewGroup viewGroup ) { } @ Override public void scrollVerticallyTo ( int y ) { } public void scrollVerticallyToPosition ( int position ) { } @ Override public int getCurrentScrollY ( ) { } @ Override public boolean onTouchEvent ( MotionEvent ev ) { } public boolean toolbarIsShown ( Toolbar mToolbar ) { } public boolean toolbarIsHidden ( Toolbar mToolbar ) { }

Fix:
mEmpty . setVisibility ( ( ( mEmptyId ) != 0 ? View . VISIBLE : View . GONE ) ) ;