Buggy code:
public class ButtonOnClickListener implements View . OnClickListener { TextView textView ; String input ; public ButtonOnClickListener ( TextView textView ) { } public void onClick ( View view ) { String string = textView . getText ( ) . toString ( ) ; String last = string . substring ( ( ( string . length ( ) ) - 1 ) ) ; Log . d ( "last" , last ) ; int click = view . getId ( ) ; switch ( click ) { case id . but0 : input += "0" ; break ; case id . but1 : input += "1" ; break ; case id . but2 : input += "2" ; break ; case id . but3 : input += "3" ; break ; case id . but4 : input += "4" ; break ; case id . but5 : input += "5" ; break ; case id . but6 : input += "6" ; break ; case id . but7 : input += "7" ; break ; case id . but8 : input += "8" ; break ; case id . but9 : input += "9" ; break ; case id . butDot : if ( last . equals ( "." ) ) { input += "" ; <START_BUG> } <END_BUG> if ( last . equals ( "+" ) ) { input += "0." ; } else if ( last . equals ( "-" ) ) { input += "0." ; } else if ( last . equals ( "//" ) ) { input += "0." ; } else if ( last . equals ( "*" ) ) { input += "0." ; } else if ( string . equals ( "<seq2seq4repair_space>" ) ) { input += "0." ; } else { input += "." ; } break ; case id . butSum : if ( last . equals ( "+" ) ) { input += "" ; } else if ( last . equals ( "-" ) ) { input += "" ; } else if ( last . equals ( "//" ) ) { input += "" ; } else if ( last . equals ( "*" ) ) { input += "" ; } else if ( string . equals ( "<seq2seq4repair_space>" ) ) { input += "" ; } else { input += "+" ; } break ; case id . butSub : if ( last . equals ( "+" ) ) { input += "" ; } else if ( last . equals ( "-" ) ) { input += "" ; } else if ( last . equals ( "//" ) ) { input += "" ; } else if ( last . equals ( "*" ) ) { input += "" ; } else { input += "-" ; } break ; case id . butMult : if ( last . equals ( "+" ) ) { input += "" ; } else if ( last . equals ( "-" ) ) { input += "" ; } else if ( last . equals ( "//" ) ) { input += "" ; } else if ( last . equals ( "*" ) ) { input += "" ; } else if ( string . equals ( "<seq2seq4repair_space>" ) ) { input += "" ; } else { input += "*" ; } break ; case id . butDiv : if ( last . equals ( "+" ) ) { input += "" ; } else if ( last . equals ( "-" ) ) { input += "" ; } else if ( last . equals ( "//" ) ) { input += "" ; } else if ( last . equals ( "*" ) ) { input += "" ; } else if ( string . equals ( "<seq2seq4repair_space>" ) ) { input += "" ; } else { input += "//" ; } break ; case id . butDelete : if ( ( input . length ( ) ) > 1 ) { input = input . substring ( 0 , ( ( input . length ( ) ) - 1 ) ) ; } else { input = "<seq2seq4repair_space>" ; } break ; case id . butClr : input = "<seq2seq4repair_space>" ; break ; case id . butSin : input += "Sin(" ; break ; case id . butCos : input += "Cos(" ; break ; case id . butTan : input += "Tan(" ; break ; case id . butLog : input += "Log(" ; break ; case id . butLn : input += "Ln(" ; break ; case id . butLeftParent : input += "(" ; break ; case id . butRightParent : input += ")" ; break ; case id . butExponent : input += "e^(" ; break ; case id . butPI : input += "π" ; break ; case id . butPercent : input += "%" ; break ; } textView . setText ( input ) ; } }

Fix:
} else