Buggy code:
public class MainActivityFragment extends Fragment implements SensorEventListener , View . OnClickListener , GameView . ThreadListener { final String LOG_TAG = MainActivityFragment . class . getSimpleName ( ) ; public static final int CURRENT_SCORE = 0 ; public static final int WORLD_SCORE = 1 ; public static final int SOCIAL_SCORE = 2 ; public static final int USER_SCORE = 3 ; static final int DEATH_ANIMATION_SPEED = 1000 ; static final int RESTART_ANIMATION_SPEED = 1000 ; static final int START_ANIMATION_SPEED = 400 ; static final int START_ANIMATION_SHORT_DELAY = 0 ; static final int NO_FADE = 0 ; static final int FADE_IN = 1 ; static final int FADE_OUT = 2 ; private static List < int [ ] > colourArray ; private static MainActivityFragment . ColourSet colourSet ; private static int maxBackgroundSize ; public static int [ ] fabStartLocation = new int [ 2 ] ; public static int [ ] fabEndLocation = new int [ ] { 0 , 0 } ; private static float fabScale ; private static int fabRadius ; private static int statusBarOffset ; private static boolean animationFlag = false ; private FloatingActionButton mFab ; private View mTempToolbar ; private LinearLayout mAltBackground ; private View mToolbarView ; private TextView mWorldScore ; private TextView mUserScore ; private TextView mCurrentScore ; private SensorManager sensorManager = null ; private int mAxis = 0 ; private int mSensorDirection = 1 ; private int mSensorValue ; private GameLoop mGameLoop ; private GameView mGameView ; public MainActivityFragment ( ) { } public interface GameCompletedListener { void updateAccomplishments ( int score ) { } } MainActivityFragment . GameCompletedListener mGameCompletedListener = null ; @ Override public View onCreateView ( LayoutInflater inflater , ViewGroup container , Bundle savedInstanceState ) { } private void initViews ( View view , Bundle savedInstanceState ) { } public void updateGameLoop ( ) { } @ Override public void onStart ( ) { } @ Override public void onPause ( ) { } @ Override public void onResume ( ) { } @ Override public void onStop ( ) { } @ Override public void onSaveInstanceState ( Bundle outState ) { } public void setListener ( MainActivityFragment . GameCompletedListener l ) { } private void initDimensions ( ) { } private void initColours ( ) { } private void onGameStart ( ) { } private void onGamePause ( ) { } public void onGameStop ( ) { Log . v ( LOG_TAG , "onGameStop,<seq2seq4repair_space>game<seq2seq4repair_space>reset." ) ; <START_BUG> int finalScore = mGameLoop . getCurrentScore ( ) ; <END_BUG> mGameLoop . setState ( STATE_END ) ; mGameCompletedListener . updateAccomplishments ( finalScore ) ; MainActivityFragment . colourSet . setGameColours ( ) ; MainActivityFragment . animationFlag = false ; animateBackgroundReveal ( mAltBackground ) . start ( ) ; animateBackgroundReveal ( mTempToolbar ) . start ( ) ; mFab . setVisibility ( INVISIBLE ) ; mFab . clearAnimation ( ) ; mFab . setBackgroundTintList ( ColorStateList . valueOf ( MainActivityFragment . colourSet . secondaryColour ) ) ; mWorldScore . setBackgroundColor ( MainActivityFragment . colourSet . getPrimaryColour ( Utilities . COLOUR_LOCATION_SCORE ) ) ; } public void updateScoreViews ( int view , float score , int fadeType ) { } private void setAxis ( int rotation ) { } private void animateBackgroundFade ( final View view , final int colour ) { } private SupportAnimator animateBackgroundReveal ( final View view ) { } private void animateFabIn ( long startDelay ) { } private void setToolbarColour ( int colour ) { } private BroadcastReceiver mStateChangedReceiver = new BroadcastReceiver ( ) { @ Override public void onReceive ( Context context , Intent intent ) { } } ; @ Override public void onClick ( View v ) { } @ Override public void onSensorChanged ( SensorEvent event ) { } @ Override public void onAccuracyChanged ( Sensor sensor , int accuracy ) { } public class ColourSet { public int [ ] primarySet ; public int [ ] secondarySet ; public int secondaryColour ; public int secondaryColourDark ; public int primaryColour ; public int primaryColourDark ; public ColourSet ( ) { } public void setGameColours ( ) { } private boolean isGoodColourPair ( ) { } private int getRandomColourSet ( ) { } public int getColour ( int [ ] colour , int colourLevel ) { } public int getPrimaryColour ( int colourLevel ) { } public int getSecondaryColour ( int colourLevel ) { } } }

Fix:
int finalScore = ( mGameLoop . getCurrentScore ( ) ) // 2 ;