Buggy code:
public class Quantitative extends Activity { int start = 1 ; final Context context = this ; @ Override public void onCreate ( Bundle savedInstanceState ) { super . onCreate ( savedInstanceState ) ; if ( ( ( getIntent ( ) . getFlags ( ) ) & ( Intent . FLAG_ACTIVITY_BROUGHT_TO_FRONT ) ) != 0 ) { finish ( ) ; return ; } setContentView ( qtest_home ) ; Button btn_home = ( ( Button ) ( findViewById ( btn_home ) ) ) ; Button btn_fav = ( ( Button ) ( findViewById ( btn_fav ) ) ) ; Button btn_score = ( ( Button ) ( findViewById ( btn_score ) ) ) ; Button btn_tutorial = ( ( Button ) ( findViewById ( btn_tutorial ) ) ) ; Button btn_about = ( ( Button ) ( findViewById ( btn_aboutus ) ) ) ; Button btn_help = ( ( Button ) ( findViewById ( btn_help ) ) ) ; btn_help . setOnClickListener ( new View . OnClickListener ( ) { @ Override public void onClick ( View view ) { Intent i = new Intent ( getApplicationContext ( ) , Help . class ) ; startActivity ( i ) ; } } ) ; btn_home . setOnClickListener ( new View . OnClickListener ( ) { @ Override public void onClick ( View view ) { Intent i = new Intent ( getApplicationContext ( ) , Home . class ) ; i . setFlags ( FLAG_ACTIVITY_CLEAR_TOP ) ; startActivity ( i ) ; } } ) ; btn_fav . setOnClickListener ( new View . OnClickListener ( ) { @ Override public void onClick ( View view ) { Intent i = new Intent ( getApplicationContext ( ) , FavPage . class ) ; startActivity ( i ) ; } } ) ; btn_score . setOnClickListener ( new View . OnClickListener ( ) { @ Override public void onClick ( View view ) { Intent i = new Intent ( getApplicationContext ( ) , scoremenu . class ) ; startActivity ( i ) ; } } ) ; btn_tutorial . setOnClickListener ( new View . OnClickListener ( ) { @ Override public void onClick ( View view ) { Intent i = new Intent ( getApplicationContext ( ) , Tutorialpage . class ) ; startActivity ( i ) ; } } ) ; btn_about . setOnClickListener ( new View . OnClickListener ( ) { @ Override public void onClick ( View view ) { Intent i = new Intent ( getApplicationContext ( ) , AboutUs . class ) ; startActivity ( i ) ; } } ) ; <START_BUG> Button btn_qtest1 = ( ( Button ) ( findViewById ( btn_vltest7 ) ) ) ; <END_BUG> btn_qtest1 . setOnClickListener ( new View . OnClickListener ( ) { @ Override public void onClick ( View view ) { buttonClick ( "q1" ) ; } } ) ; Button btn_qtest2 = ( ( Button ) ( findViewById ( btn_qtest2 ) ) ) ; btn_qtest2 . setOnClickListener ( new View . OnClickListener ( ) { @ Override public void onClick ( View view ) { buttonClick ( "q2" ) ; } } ) ; Button btn_qtest3 = ( ( Button ) ( findViewById ( btn_qtest3 ) ) ) ; btn_qtest3 . setOnClickListener ( new View . OnClickListener ( ) { @ Override public void onClick ( View view ) { buttonClick ( "q3" ) ; } } ) ; Button btn_qtest4 = ( ( Button ) ( findViewById ( btn_qtest4 ) ) ) ; btn_qtest4 . setOnClickListener ( new View . OnClickListener ( ) { @ Override public void onClick ( View view ) { buttonClick ( "q5" ) ; } } ) ; Button btn_qtest5 = ( ( Button ) ( findViewById ( btn_qtest5 ) ) ) ; btn_qtest5 . setOnClickListener ( new View . OnClickListener ( ) { @ Override public void onClick ( View view ) { buttonClick ( "q6" ) ; } } ) ; Button btn_qtest6 = ( ( Button ) ( findViewById ( btn_qtest6 ) ) ) ; btn_qtest6 . setOnClickListener ( new View . OnClickListener ( ) { @ Override public void onClick ( View view ) { buttonClick ( "q7" ) ; } } ) ; Button btn_qtest7 = ( ( Button ) ( findViewById ( btn_qtest7 ) ) ) ; btn_qtest7 . setOnClickListener ( new View . OnClickListener ( ) { @ Override public void onClick ( View view ) { buttonClick ( "q8" ) ; } } ) ; Button btn_qtest8 = ( ( Button ) ( findViewById ( btn_qtest8 ) ) ) ; btn_qtest8 . setOnClickListener ( new View . OnClickListener ( ) { @ Override public void onClick ( View view ) { buttonClick ( "q10" ) ; } } ) ; Button btn_qtest9 = ( ( Button ) ( findViewById ( btn_qtest9 ) ) ) ; btn_qtest9 . setOnClickListener ( new View . OnClickListener ( ) { @ Override public void onClick ( View view ) { buttonClick ( "q11" ) ; } } ) ; Button btn_qtest10 = ( ( Button ) ( findViewById ( btn_qtest10 ) ) ) ; btn_qtest10 . setOnClickListener ( new View . OnClickListener ( ) { @ Override public void onClick ( View view ) { buttonClick ( "q12" ) ; } } ) ; Button btn_qtest11 = ( ( Button ) ( findViewById ( btn_qtest11 ) ) ) ; btn_qtest11 . setOnClickListener ( new View . OnClickListener ( ) { @ Override public void onClick ( View view ) { buttonClick ( "q13" ) ; } } ) ; Button btn_qtest12 = ( ( Button ) ( findViewById ( btn_qtest12 ) ) ) ; btn_qtest12 . setOnClickListener ( new View . OnClickListener ( ) { @ Override public void onClick ( View view ) { buttonClick ( "q15" ) ; } } ) ; Button btn_qtest13 = ( ( Button ) ( findViewById ( btn_qtest13 ) ) ) ;

Fix:
Button btn_qtest1 = ( ( Button ) ( findViewById ( btn_qtest1 ) ) ) ;