Buggy code:
public class GameActivity extends MSBaseActivity implements GameFragment . OnFragmentInteractionListener , GameWorkerFragment . OnWorkerFragmentCallbacks { public static final String EXTRA_DIMENSION = "extra.DIMENSION" ; public static final String EXTRA_MINES = "extra.MINES" ; public static final String EXTRA_LOAD_GAME = "extra.LOAD_GAME" ; public static final int INDEX_MENU_FLAG_MODE = 2 ; public static final int INDEX_MENU_CHEAT = 3 ; protected GameWorkerFragment mWorkerFragment ; protected GameFragment mGameFragment ; @ Override protected void onCreate ( Bundle savedInstanceState ) { super . onCreate ( savedInstanceState ) ; FragmentManager fm = getFragmentManager ( ) ; mWorkerFragment = ( ( GameWorkerFragment ) ( fm . findFragmentByTag ( FRAGMENT_TAG ) ) ) ; Resources resources = getResources ( ) ; int dimension = 0 ; int mines = 0 ; boolean loadGame = false ; if ( ( mWorkerFragment ) == null ) { Intent intent = getIntent ( ) ; if ( intent != null ) { dimension = intent . getIntExtra ( GameActivity . EXTRA_DIMENSION , resources . getInteger ( ms_default_dimension ) ) ; mines = intent . getIntExtra ( GameActivity . EXTRA_MINES , resources . getInteger ( ms_default_dimension ) ) ; loadGame = intent . getBooleanExtra ( GameActivity . EXTRA_LOAD_GAME , false ) ; } else { dimension = resources . getInteger ( ms_default_dimension ) ; <START_BUG> mines = resources . getInteger ( ms_default_dimension ) ; <END_BUG> } mWorkerFragment = GameWorkerFragment . newInstance ( dimension , mines , loadGame ) ; fm . beginTransaction ( ) . add ( mWorkerFragment , FRAGMENT_TAG ) . commit ( ) ; } else { dimension = mWorkerFragment . getDimension ( ) ; mines = mWorkerFragment . getMines ( ) ; } ActionBar actionBar = getActionBar ( ) ; if ( actionBar != null ) { getActionBar ( ) . setDisplayHomeAsUpEnabled ( true ) ; updateActionBarTitle ( actionBar , dimension , mines ) ; } fm . beginTransaction ( ) . replace ( content , GameFragment . newInstance ( ) ) . commit ( ) ; } public void updateActionBarTitle ( ActionBar actionBar , int dimension , int mines ) { } @ Override public boolean onCreateOptionsMenu ( Menu menu ) { } @ Override public boolean onOptionsItemSelected ( MenuItem item ) { } public GameFragment getGameFragment ( ) { } public void setGameFragment ( GameFragment gameFragment ) { } @ Override public void onGenerateGameDataPreExecute ( ) { } @ Override public void onGenerateGameDataCancelled ( ) { } @ Override public void onGenerateGameDataPostExecute ( MSGame result ) { } @ Override public void onExploreCellPreExecute ( ) { } @ Override public void onExploreCellCancelled ( ) { } @ Override public void onExploreCellPostExecute ( MSGameState result ) { } @ Override public void onFlagCellPreExecute ( ) { } @ Override public void onFlagCellCancelled ( ) { } @ Override public void onFlagCellPostExecute ( MSGameState result ) { } @ Override public void onValidateGamePreExecute ( ) { } @ Override public void onValidateGameCancelled ( ) { } @ Override public void onValidateGamePostExecute ( MSGameState result ) { } @ Override public void onToggleCheatModePreExecute ( ) { } @ Override public void onToggleCheatModeCancelled ( ) { } @ Override public void onToggleCheatModePostExecute ( MSGame result ) { } @ Override public void onToggleFlagModePreExecute ( ) { } @ Override public void onToggleFlagModeCancelled ( ) { } @ Override public void onToggleFlagModePostExecute ( MSGame result ) { } @ Override public void onGameFragmentAttached ( GameFragment gameFragment ) { } }

Fix:
mines = resources . getInteger ( ms_default_mines ) ;