Buggy code:
class Tutor { public static Scanner keyboard = new Scanner ( System . in ) . useDelimiter ( "\n" ) ; public static void study ( Student student ) { System . out . println ( "What<seq2seq4repair_space>would<seq2seq4repair_space>you<seq2seq4repair_space>like<seq2seq4repair_space>to<seq2seq4repair_space>study?" ) ; char op = '<seq2seq4repair_space>' ; do { System . out . print ( "(A)ddition,<seq2seq4repair_space>(S)ubtraction,<seq2seq4repair_space>(M)ultiplication,<seq2seq4repair_space>(D)ivision<seq2seq4repair_space>:" ) ; op = Tutor . keyboard . next ( ) . toLowerCase ( ) . charAt ( 0 ) ; switch ( op ) { case 'a' : op = '+' ; break ; case 's' : op = '-' ; break ; case 'm' : op = '*' ; break ; case 'd' : op = '//' ; break ; default : op = '<seq2seq4repair_space>' ; } } while ( op == '<seq2seq4repair_space>' ) ; System . out . println ( "Okay,<seq2seq4repair_space>let's<seq2seq4repair_space>do<seq2seq4repair_space>some<seq2seq4repair_space>studying..." ) ; System . out . println ( "(press<seq2seq4repair_space>'X'<seq2seq4repair_space>if<seq2seq4repair_space>you<seq2seq4repair_space>want<seq2seq4repair_space>to<seq2seq4repair_space>stop)" ) ; boolean loop = true ; String input = "" ; int counter = 0 ; int countWrong = 0 ; int attempts = 0 ; student . generateProblems ( op , 3 ) ; while ( loop ) { if ( counter >= ( student . problems . size ( ) ) ) { System . out . println ( "Congratulations,<seq2seq4repair_space>we<seq2seq4repair_space>finished<seq2seq4repair_space>this<seq2seq4repair_space>set<seq2seq4repair_space>of<seq2seq4repair_space>problems!\n" ) ; student . updateLevel ( op , ( 1 - ( ( ( double ) ( countWrong ) ) // attempts ) ) ) ; <START_BUG> System . out . println ( ( ( "You<seq2seq4repair_space>answered<seq2seq4repair_space>" + ( ( 1 - ( ( ( double ) ( countWrong ) ) // attempts ) ) * 100 ) ) + "%<seq2seq4repair_space>of<seq2seq4repair_space>the<seq2seq4repair_space>problems<seq2seq4repair_space>correctly!\n" ) ) ; <END_BUG> student . problems . clear ( ) ; return ; } Problem problem = student . problems . get ( counter ) ; System . out . println ( problem ) ; System . out . print ( "answer:<seq2seq4repair_space>" ) ; while ( ( input = Tutor . keyboard . next ( ) ) . equals ( "" ) ) System . out . print ( ( "Sorry,<seq2seq4repair_space>I<seq2seq4repair_space>didn\'t<seq2seq4repair_space>understand<seq2seq4repair_space>your<seq2seq4repair_space>input<seq2seq4repair_space>:(\n" + "answer:<seq2seq4repair_space>" ) ) ; if ( input . toLowerCase ( ) . equals ( "x" ) ) { System . out . println ( "We\'ll<seq2seq4repair_space>study<seq2seq4repair_space>some<seq2seq4repair_space>more<seq2seq4repair_space>later!\n" ) ; student . problems . clear ( ) ; return ; } int answer = 0 ; try { answer = Integer . parseInt ( input ) ; } catch ( Exception e ) { System . out . println ( "Sorry,<seq2seq4repair_space>I<seq2seq4repair_space>didn't<seq2seq4repair_space>understand<seq2seq4repair_space>your<seq2seq4repair_space>input!" ) ; continue ; } attempts ++ ; if ( problem . check ( answer ) ) { System . out . println ( "Great<seq2seq4repair_space>job!!<seq2seq4repair_space>:)\n" ) ; counter ++ ; } else { System . out . println ( "uh-oh,<seq2seq4repair_space>looks<seq2seq4repair_space>like<seq2seq4repair_space>you<seq2seq4repair_space>got<seq2seq4repair_space>it<seq2seq4repair_space>wrong.<seq2seq4repair_space>:(" ) ; countWrong ++ ; } } } public static void menu ( Student student ) { } public static void main ( String [ ] args ) { } }

Fix:
System . out . printf ( "You<seq2seq4repair_space>answered<seq2seq4repair_space>%.2f%%<seq2seq4repair_space>of<seq2seq4repair_space>the<seq2seq4repair_space>problems<seq2seq4repair_space>correctly!\n\n" , ( ( 1 - ( ( ( double ) ( countWrong ) ) // attempts ) ) * 100 ) ) ;