Buggy code:
public class GameActivity extends ActionBarActivity implements View . OnClickListener { private static final String TAG = "GameActivity" ; private static final String COLOR_PIN_KNOCKED = "#000000" ; private static final String COLOR_PIN_STANDING = "#99CC00" ; private long [ ] gameID = null ; private long [ ] frameID = null ; private int numberOfGames = - 1 ; private int currentGame = 0 ; private int currentFrame = 0 ; private int currentBall = 0 ; private boolean [ ] hasFrameBeenAccessed = null ; private List < List < TextView > > ballsTextViews = null ; private List < TextView > framesTextViews = null ; private List < CircleButton > pinButtons = null ; private List < List < boolean [ ] > > balls = null ; private int [ ] gameScores = null ; private HorizontalScrollView hsvFrames = null ; @ Override protected void onCreate ( Bundle savedInstanceState ) { } @ Override protected void onResume ( ) { } @ Override protected void onPause ( ) { } @ Override public boolean onCreateOptionsMenu ( Menu menu ) { } @ Override public boolean onOptionsItemSelected ( MenuItem item ) { } private void showGameStats ( ) { } private int getPixelsFromDP ( int dps ) { } @ Override public void onClick ( View view ) { } private int getValueOfFrame ( boolean [ ] frame ) { } private String getValueOfBall ( List < boolean [ ] > ballsOfFrame , int ball ) { } private void updateBalls ( int frameToUpdate ) { } private void updateScore ( ) { int [ ] frameScores = new int [ 10 ] ; for ( int f = ( Constants . NUMBER_OF_FRAMES ) - 1 ; f >= 0 ; f -- ) { if ( f == ( ( Constants . NUMBER_OF_FRAMES ) - 1 ) ) { for ( int b = 2 ; b >= 0 ; b -- ) { switch ( b ) { case 2 : frameScores [ f ] += getValueOfFrame ( balls . get ( f ) . get ( b ) ) ; break ; case 1 : case 0 : if ( areFramesEqual ( balls . get ( f ) . get ( b ) , FRAME_CLEAR ) ) { frameScores [ f ] += getValueOfFrame ( balls . get ( f ) . get ( b ) ) ; } break ; default : } } } else { for ( int b = 0 ; b < 3 ; b ++ ) { if ( areFramesEqual ( balls . get ( f ) . get ( b ) , FRAME_CLEAR ) ) { frameScores [ f ] += getValueOfFrame ( balls . get ( f ) . get ( b ) ) ; frameScores [ f ] += getValueOfFrame ( balls . get ( ( f + 1 ) ) . get ( 0 ) ) ; if ( b == 0 ) { if ( ( f == 8 ) || ( ! ( areFramesEqual ( balls . get ( ( f + 1 ) ) . get ( 0 ) , FRAME_CLEAR ) ) ) ) { frameScores [ f ] += getValueOfFrame ( balls . get ( ( f + 1 ) ) . get ( 1 ) ) ; } else if ( areFramesEqual ( balls . get ( ( f + 1 ) ) . get ( 0 ) , FRAME_CLEAR ) ) { <START_BUG> frameScores [ f ] += getValueOfFrame ( balls . get ( ( f + 1 ) ) . get ( 0 ) ) ; <END_BUG> } } break ; } else if ( b == 2 ) { frameScores [ f ] += getValueOfFrame ( balls . get ( f ) . get ( b ) ) ; } } } } int totalScore = 0 ; for ( int i = 0 ; i < ( frameScores . length ) ; i ++ ) { totalScore += frameScores [ i ] ; framesTextViews . get ( i ) . setText ( String . valueOf ( totalScore ) ) ; } gameScores [ currentGame ] = totalScore ; } private void clearFrameColor ( ) { } private void updateFrameColor ( ) { } private boolean areFramesEqual ( boolean [ ] frame , boolean [ ] frameToCompare ) { } private void saveGameToDatabase ( boolean shouldShowSavedMessage ) { } private void loadGameFromDatabase ( int newGame ) { } private void focusOnFrame ( ) { } private boolean getBoolean ( char input ) { } private String booleanFrameToString ( boolean [ ] frame ) { } }

Fix:
frameScores [ f ] += getValueOfFrame ( balls . get ( ( f + 2 ) ) . get ( 0 ) ) ;