Buggy code:
public class Tquants extends Activity { public void onCreate ( Bundle savedInstanceState ) { super . onCreate ( savedInstanceState ) ; setContentView ( qtest_home ) ; <START_BUG> Button btn_q1 = ( ( Button ) ( findViewById ( btn_vltest7 ) ) ) ; <END_BUG> btn_q1 . setOnClickListener ( new View . OnClickListener ( ) { @ Override public void onClick ( View view ) { Intent i = new Intent ( getApplicationContext ( ) , Tutorial . class ) ; i . putExtra ( "string" , "sec1" ) ; startActivity ( i ) ; } } ) ; Button btn_q2 = ( ( Button ) ( findViewById ( btn_qtest2 ) ) ) ; btn_q2 . setOnClickListener ( new View . OnClickListener ( ) { @ Override public void onClick ( View view ) { Intent i = new Intent ( getApplicationContext ( ) , Tutorial . class ) ; i . putExtra ( "string" , "sec2" ) ; startActivity ( i ) ; } } ) ; Button btn_q4 = ( ( Button ) ( findViewById ( btn_qtest3 ) ) ) ; btn_q4 . setOnClickListener ( new View . OnClickListener ( ) { @ Override public void onClick ( View view ) { Intent i = new Intent ( getApplicationContext ( ) , Tutorial . class ) ; i . putExtra ( "string" , "sec4" ) ; startActivity ( i ) ; } } ) ; Button btn_q5 = ( ( Button ) ( findViewById ( btn_qtest4 ) ) ) ; btn_q5 . setOnClickListener ( new View . OnClickListener ( ) { @ Override public void onClick ( View view ) { Intent i = new Intent ( getApplicationContext ( ) , Tutorial . class ) ; i . putExtra ( "string" , "sec5" ) ; startActivity ( i ) ; } } ) ; Button btn_q6 = ( ( Button ) ( findViewById ( btn_qtest5 ) ) ) ; btn_q6 . setOnClickListener ( new View . OnClickListener ( ) { @ Override public void onClick ( View view ) { Intent i = new Intent ( getApplicationContext ( ) , Tutorial . class ) ; i . putExtra ( "string" , "sec6" ) ; startActivity ( i ) ; } } ) ; Button btn_q7 = ( ( Button ) ( findViewById ( btn_qtest6 ) ) ) ; btn_q7 . setOnClickListener ( new View . OnClickListener ( ) { @ Override public void onClick ( View view ) { Intent i = new Intent ( getApplicationContext ( ) , Tutorial . class ) ; i . putExtra ( "string" , "sec7" ) ; startActivity ( i ) ; } } ) ; Button btn_q8 = ( ( Button ) ( findViewById ( btn_qtest7 ) ) ) ; btn_q8 . setOnClickListener ( new View . OnClickListener ( ) { @ Override public void onClick ( View view ) { Intent i = new Intent ( getApplicationContext ( ) , Tutorial . class ) ; i . putExtra ( "string" , "sec8" ) ; startActivity ( i ) ; } } ) ; Button btn_q10 = ( ( Button ) ( findViewById ( btn_qtest8 ) ) ) ; btn_q10 . setOnClickListener ( new View . OnClickListener ( ) { @ Override public void onClick ( View view ) { Intent i = new Intent ( getApplicationContext ( ) , Tutorial . class ) ; i . putExtra ( "string" , "sec10" ) ; startActivity ( i ) ; } } ) ; Button btn_q11 = ( ( Button ) ( findViewById ( btn_qtest9 ) ) ) ; btn_q11 . setOnClickListener ( new View . OnClickListener ( ) { @ Override public void onClick ( View view ) { Intent i = new Intent ( getApplicationContext ( ) , Tutorial . class ) ; i . putExtra ( "string" , "sec11" ) ; startActivity ( i ) ; } } ) ; Button btn_q12 = ( ( Button ) ( findViewById ( btn_qtest10 ) ) ) ; btn_q12 . setOnClickListener ( new View . OnClickListener ( ) { @ Override public void onClick ( View view ) { Intent i = new Intent ( getApplicationContext ( ) , Tutorial . class ) ; i . putExtra ( "string" , "sec12" ) ; startActivity ( i ) ; } } ) ; Button btn_q13 = ( ( Button ) ( findViewById ( btn_qtest11 ) ) ) ; btn_q13 . setOnClickListener ( new View . OnClickListener ( ) { @ Override public void onClick ( View view ) { Intent i = new Intent ( getApplicationContext ( ) , Tutorial . class ) ; i . putExtra ( "string" , "sec13" ) ; startActivity ( i ) ; } } ) ; Button btn_q15 = ( ( Button ) ( findViewById ( btn_qtest12 ) ) ) ; btn_q15 . setOnClickListener ( new View . OnClickListener ( ) { @ Override public void onClick ( View view ) { Intent i = new Intent ( getApplicationContext ( ) , Tutorial . class ) ; i . putExtra ( "string" , "sec15" ) ; startActivity ( i ) ; } } ) ; Button btn_q16 = ( ( Button ) ( findViewById ( btn_qtest13 ) ) ) ; btn_q16 . setOnClickListener ( new View . OnClickListener ( ) { @ Override public void onClick ( View view ) { Intent i = new Intent ( getApplicationContext ( ) , Tutorial . class ) ; i . putExtra ( "string" , "sec16" ) ; startActivity ( i ) ; } } ) ; Button btn_q17 = ( ( Button ) ( findViewById ( btn_qtest14 ) ) ) ; btn_q17 . setOnClickListener ( new View . OnClickListener ( ) { @ Override public void onClick ( View view ) { Intent i = new Intent ( getApplicationContext ( ) , Tutorial . class ) ; i . putExtra ( "string" , "sec17" ) ; startActivity ( i ) ; } } ) ;

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