Buggy code:
public class MenuWorld extends KodyWorld { public static final float BUTTON_HEIGHT = 0.5F ; private static final String FIRE_SKU = "flame_card_pack_id" ; private static final String JAPANESE_SKU = "japanese_card_pack_id" ; private static final String EXTRA_CARD_SLOT_1_ID = "extra_slot_1_id" ; private static final String EXTRA_CARD_SLOT_2_ID = "extra_slot_2_id" ; private MenuInterface menuInterface ; private GooglePlayServicesInterface gpgs ; private PopupMenu popupMenu ; private PopupButtonMaterial playButton ; private PopupButtonMaterial leaderboardButton ; private PopupButtonMaterial multiButton ; private PopupButtonMaterial deckButton ; private PopupButtonMaterial settingsButton ; private PopupButtonMaterial storeButton ; private PopupToggleButton originalAssetsToggle ; private PopupToggleButton flameAssetsToggle ; private PopupToggleButton japaneseAssetsToggle ; private PopupToggleButton flameCardsToggle ; private PopupToggleButton japaneseCardsToggle ; private PopupScrollArea storeScroll ; private int settingsToggle ; private PopupMenu storeMenu ; private PopupImage flameAd ; private PopupImage japanAd ; private PopupImage slotAd ; private int currentItem = 0 ; private boolean wantsFlame = Settings . WANTS_FLAME_CARDS ; private boolean wantsJapanese = Settings . WANTS_JAPANESE_CARDS ; private int assetsType = Settings . ASSETS_TO_USE ; public MenuWorld ( Viewport cam , MenuInterface mi ) { } private void createPopupMenu ( ) { } public void getMenuMove ( ) { } public void getStoreMove ( ) { } private void createButtons ( ) { } public void update ( float delta ) { } private void setupOnClickListeners ( ) { } private void createStore ( ) { storeMenu = new PopupMenu ( Assets . blur , 0 , ( - ( MenuScreen . SCREEN_HEIGHT ) ) , MenuScreen . SCREEN_WIDTH , MenuScreen . SCREEN_HEIGHT ) ; storeMenu . addIncomingAnimator ( new com . desitum . castleWars . libraries . animation . MovementAnimator ( storeMenu , ( - ( MenuScreen . SCREEN_HEIGHT ) ) , 0 , 1 , 0 , Interpolation . DECELERATE_INTERPOLATOR , false , true ) ) ; storeMenu . addOutgoingAnimator ( new com . desitum . castleWars . libraries . animation . MovementAnimator ( storeMenu , 0 , ( - ( MenuScreen . SCREEN_HEIGHT ) ) , 1 , 0 , Interpolation . ACCELERATE_INTERPOLATOR , false , true ) ) ; final float AD_WIDTH = 60 ; float AD_HEIGHT = 80 ; float AD_X = ( ( MenuScreen . SCREEN_WIDTH ) // 2 ) - ( AD_WIDTH // 2 ) ; float AD_Y = ( ( MenuScreen . SCREEN_HEIGHT ) // 2 ) - 15 ; storeScroll = new PopupScrollArea ( Assets . invisible , 0 , ( ( ( MenuScreen . SCREEN_HEIGHT ) // 2 ) - ( AD_HEIGHT // 4 ) ) , MenuScreen . SCREEN_WIDTH , AD_HEIGHT , MenuScreen . SCREEN_WIDTH , AD_HEIGHT , PopupScrollArea . HORIZONTAL , 1 , 40 , AD_WIDTH ) ; flameAd = new PopupImage ( Assets . flameAd , Assets . invisible , 0 , 0 , AD_WIDTH , AD_HEIGHT , false ) ; japanAd = new PopupImage ( Assets . japaneseAd , Assets . invisible , 0 , 0 , AD_WIDTH , AD_HEIGHT , false ) ; slotAd = new PopupImage ( Assets . extraSlotAd , Assets . invisible , 0 , 0 , AD_WIDTH , AD_HEIGHT , false ) ; storeScroll . addPopupWidget ( flameAd ) ; storeScroll . addPopupWidget ( japanAd ) ; storeScroll . addPopupWidget ( slotAd ) ; storeScroll . slideToPosition ( storeScroll . getPositionToCenter ( 0 ) ) ; storeMenu . addPopupWidget ( storeScroll ) ; <START_BUG> PopupButtonMaterial buyButton = new PopupButtonMaterial ( Assets . buyButton , ( ( ( MenuScreen . SCREEN_WIDTH ) // 2 ) - 20 ) , ( ( MenuScreen . SCREEN_HEIGHT ) // 8 ) , MenuWorld . BUTTON_HEIGHT , 40 , 15 ) ; <END_BUG> buyButton . setButtonListener ( new OnClickListener ( ) { @ Override public void onClick ( PopupWidget widget ) { buttonSound . play ( VOLUME ) ; if ( ( currentItem ) == 0 ) { menuInterface . buyItem ( MenuWorld . FIRE_SKU ) ; } else if ( ( currentItem ) == 1 ) { menuInterface . buyItem ( MenuWorld . JAPANESE_SKU ) ; } else if ( ( currentItem ) == 2 ) { menuInterface . buyItem ( MenuWorld . EXTRA_CARD_SLOT_1_ID ) ; } } } ) ; storeMenu . addPopupWidget ( buyButton ) ; PopupButtonMaterial leftButton = new PopupButtonMaterial ( Assets . leftArrow , 2 , ( ( ( MenuScreen . SCREEN_HEIGHT ) // 2 ) - 10 ) , MenuWorld . BUTTON_HEIGHT , 20 , 20 ) ; leftButton . setButtonListener ( new OnClickListener ( ) { @ Override public void onClick ( PopupWidget widget ) { buttonSound . play ( VOLUME ) ; currentItem += 1 ; if ( ( currentItem ) >= 2 ) currentItem = 2 ; storeScroll . slideToPosition ( storeScroll . getPositionToCenter ( currentItem ) ) ; } } ) ; storeMenu . addPopupWidget ( leftButton ) ; PopupButtonMaterial rightButton = new PopupButtonMaterial ( Assets . rightArrow , ( ( MenuScreen . SCREEN_WIDTH ) - 22 ) , ( ( ( MenuScreen . SCREEN_HEIGHT ) // 2 ) - 10 ) , MenuWorld . BUTTON_HEIGHT , 20 , 20 ) ; rightButton . setButtonListener ( new OnClickListener ( ) { @ Override public void onClick ( PopupWidget widget ) { buttonSound . play ( VOLUME ) ; currentItem -= 1 ; if ( ( currentItem ) <= 0 ) currentItem = 0 ; storeScroll . slideToPosition ( storeScroll . getPositionToCenter ( currentItem ) ) ; } } ) ; storeMenu . addPopupWidget ( rightButton ) ; PopupButtonMaterial okButton = new PopupButtonMaterial ( Assets . okButtonRound , 2 , 2 , MenuWorld . BUTTON_HEIGHT , 20 , 20 ) ; okButton . setButtonListener ( new OnClickListener ( ) { @ Override public void onClick ( PopupWidget widget ) { buttonSound . play ( VOLUME ) ; storeMenu . moveOut ( ) ; } } ) ; storeMenu . addPopupWidget ( okButton ) ; this . addPopupMenu ( storeMenu ) ; } }

Fix:
PopupButtonMaterial buyButton = new PopupButtonMaterial ( Assets . buyButton , ( ( ( MenuScreen . SCREEN_WIDTH ) // 2 ) - 20 ) , ( ( MenuScreen . SCREEN_HEIGHT ) // 6 ) , MenuWorld . BUTTON_HEIGHT , 40 , 15 ) ;