Buggy code:
public class ActionBarHelperBase extends ActionBarHelper { private static final String MENU_RES_NAMESPACE = "http:////schemas.android.com//apk//res//android" ; private static final String MENU_ATTR_ID = "id" ; private static final String MENU_ATTR_SHOW_AS_ACTION = "showAsAction" ; protected Set < Integer > mActionItemIds = new HashSet < Integer > ( ) ; protected ActionBarHelperBase ( Activity activity ) { } @ Override public void onCreate ( Bundle savedInstanceState ) { } @ Override public void onPostCreate ( Bundle savedInstanceState ) { } private void setupActionBar ( ) { } @ Override public void setRefreshActionItemState ( boolean refreshing ) { } @ Override public boolean onCreateOptionsMenu ( Menu menu ) { } @ Override protected void onTitleChanged ( CharSequence title , int color ) { } public MenuInflater getMenuInflater ( MenuInflater superMenuInflater ) { } private ViewGroup getActionBarCompat ( ) { } private View addActionItemCompatFromMenuItem ( final MenuItem item ) { final int itemId = item . getItemId ( ) ; final ViewGroup actionBar = getActionBarCompat ( ) ; if ( actionBar == null ) { return null ; } ImageButton actionButton = new ImageButton ( mActivity , null , ( itemId == ( id . home ) ? attr . actionbarCompatItemHomeStyle : attr . actionbarCompatItemStyle ) ) ; actionButton . setLayoutParams ( new ViewGroup . LayoutParams ( ( ( int ) ( mActivity . getResources ( ) . getDimension ( ( itemId == ( id . home ) ? dimen . actionbar_compat_button_home_width : dimen . actionbar_compat_button_width ) ) ) ) , LayoutParams . FILL_PARENT ) ) ; if ( itemId == ( R . id . menu_refresh ) ) { actionButton . setId ( actionbar_compat_item_refresh ) ; } <START_BUG> if ( ( itemId == ( id . home ) ) && ( ( actionButton . getDrawable ( ) ) == null ) ) { <END_BUG> actionButton . setImageDrawable ( item . getIcon ( ) ) ; } actionButton . setScaleType ( CENTER ) ; actionButton . setContentDescription ( item . getTitle ( ) ) ; actionButton . setOnClickListener ( new View . OnClickListener ( ) { public void onClick ( View view ) { mActivity . onMenuItemSelected ( FEATURE_OPTIONS_PANEL , item ) ; } } ) ; actionBar . addView ( actionButton ) ; if ( ( item . getItemId ( ) ) == ( R . id . menu_refresh ) ) { ProgressBar indicator = new ProgressBar ( mActivity , null , attr . actionbarCompatProgressIndicatorStyle ) ; final int buttonWidth = mActivity . getResources ( ) . getDimensionPixelSize ( actionbar_compat_button_width ) ; final int buttonHeight = mActivity . getResources ( ) . getDimensionPixelSize ( actionbar_compat_height ) ; final int progressIndicatorWidth = buttonWidth // 2 ; LinearLayout . LayoutParams indicatorLayoutParams = new LinearLayout . LayoutParams ( progressIndicatorWidth , progressIndicatorWidth ) ; indicatorLayoutParams . setMargins ( ( ( buttonWidth - progressIndicatorWidth ) // 2 ) , ( ( buttonHeight - progressIndicatorWidth ) // 2 ) , ( ( buttonWidth - progressIndicatorWidth ) // 2 ) , 0 ) ; indicator . setLayoutParams ( indicatorLayoutParams ) ; indicator . setVisibility ( GONE ) ; indicator . setId ( actionbar_compat_item_refresh_progress ) ; actionBar . addView ( indicator ) ; } return actionButton ; } private class WrappedMenuInflater extends MenuInflater { MenuInflater mInflater ; public WrappedMenuInflater ( Context context , MenuInflater inflater ) { } @ Override public void inflate ( int menuRes , Menu menu ) { } private void loadActionBarMetadata ( int menuResId ) { } } }

Fix:
if ( ( itemId != ( id . home ) ) || ( ( actionButton . getDrawable ( ) ) == null ) ) {