Buggy code:
public final class Plans extends FragmentActivity implements OnPageChangeListener { private static final String TAG = "main" ; private static final String AD_UNITID = "a14c185ce8841c6" ; public static final HashSet < String > AD_KEYWORDS = new HashSet < String > ( ) ; public static final int MSG_BACKGROUND_START_MATCHER = 1 ; public static final int MSG_BACKGROUND_STOP_MATCHER = 2 ; public static final int MSG_BACKGROUND_START_RUNNER = 3 ; public static final int MSG_BACKGROUND_STOP_RUNNER = 4 ; public static final int MSG_BACKGROUND_PROGRESS_MATCHER = 5 ; private static boolean prefsNoAds ; private ViewPager pager ; private Plans . PlansFragmentAdapter fadapter ; private final Handler handler = new Handler ( ) { private boolean inProgressRunner = false ; private ProgressDialog statusMatcher = null ; private boolean statusMatcherProgress = false ; private String recalc = null ; @ Override public void handleMessage ( final Message msg ) { } } ; private int progressCount = 0 ; private static Handler currentHandler = null ; private static class PlansFragmentAdapter extends FragmentPagerAdapter implements TitleProvider { private final Long [ ] positions ; private final String [ ] titles ; private LogsFragment logs ; private PlansFragment home ; public PlansFragmentAdapter ( final Context context , final FragmentManager fm ) { } @ Override public int getCount ( ) { } @ Override public Fragment getItem ( final int position ) { } public int getHomeFragmentPos ( ) { } public PlansFragment getHomeFragment ( ) { } public int getLogsFragmentPos ( ) { } public LogsFragment getLogsFragment ( ) { } @ Override public String getTitle ( final int position ) { } } @ Override public void onDestroy ( ) { } @ Override public void onCreate ( final Bundle savedInstanceState ) { } @ Override protected void onResume ( ) { } @ Override protected void onNewIntent ( final Intent intent ) { } @ Override protected void onPause ( ) { } public static Handler getHandler ( ) { } @ Override public boolean onCreateOptionsMenu ( final Menu menu ) { } @ Override public boolean onOptionsItemSelected ( final MenuItem item ) { switch ( item . getItemId ( ) ) { case id . item_settings : this . startActivity ( new Intent ( this , Preferences . class ) ) ; return true ; case id . item_donate : <START_BUG> DonationHelper . startDonationActivity ( this , false ) ; <END_BUG> return true ; case id . item_logs : this . showLogsFragment ( ( - 1L ) ) ; return true ; case android . R . id . home : this . pager . setCurrentItem ( this . fadapter . getHomeFragmentPos ( ) , true ) ; LogsFragment lf = this . fadapter . getLogsFragment ( ) ; if ( lf != null ) { lf . setPlanId ( ( - 1L ) ) ; } return true ; default : return super . onOptionsItemSelected ( item ) ; } } public void showLogsFragment ( final long planId ) { } @ Override public void onPageScrolled ( final int position , final float positionOffset , final int positionOffsetPixels ) { } @ Override public void onPageSelected ( final int position ) { } @ Override public void onPageScrollStateChanged ( final int state ) { } public synchronized void setInProgress ( final int add ) { } }

Fix:
DonationHelper . startDonationActivity ( this , true ) ;