Buggy code:
public class Layout { static final Map < Integer , NumDenRecord > numDenRecordMap = new HashMap < Integer , NumDenRecord > ( ) ; static final int [ ] backgrounds = new int [ ] { drawable . background_even , drawable . background_odd } ; static int iterBacks = 0 ; public static void insertTab ( MainActivity mainActivity , Tab tab , final TabConfiguration tabConfiguration ) { } private static void generateScore ( Tab tab , TabConfiguration tabConfiguration , LayoutInflater inflater , LinearLayout layoutGrandParent ) { } private static void createDropDownListener ( final TabConfiguration tabConfiguration , Spinner dropdown ) { } private static void toggleVisibleChildren ( int position , Spinner spinner , Question triggeredQuestion ) { } private static View getView ( int iterBacks , LayoutInflater inflater , GridLayout layoutParent , View headerView , Question question , Integer componentType , int questionType ) { } private static void generateAutomaticTab ( MainActivity mainActivity , Tab tab , TabConfiguration tabConfiguration , LayoutInflater inflater , GridLayout layoutParent , Option defaultOption ) { } private static void generateManualTab ( MainActivity mainActivity , Tab tab , TabConfiguration tabConfiguration , LayoutInflater inflater , GridLayout layoutParent ) { } public static OnItemSelectedListener createAdherenceListener ( ) { AdapterView . OnItemSelectedListener listener = new AdapterView . OnItemSelectedListener ( ) { @ Override public void onItemSelected ( AdapterView < ? > parent , View view , int position , long id ) { int score = 0 ; TextView actPrescribed = ( ( TextView ) ( ( ( android . view . ViewGroup ) ( ( ( android . view . ViewGroup ) ( parent . getParent ( ) . getParent ( ) ) ) . getChildAt ( 2 ) ) ) . getChildAt ( 0 ) ) ) ; if ( ( "RDT<seq2seq4repair_space>Positive" . equals ( actPrescribed . getText ( ) ) ) || ( "RDT<seq2seq4repair_space>Negative" . equals ( actPrescribed . getText ( ) ) ) ) { if ( position == 1 ) score = 1 ; else score = 0 ; } else if ( ( "Microscopy<seq2seq4repair_space>Positive" . equals ( actPrescribed . getText ( ) ) ) || ( "Microscopy<seq2seq4repair_space>Negative" . equals ( actPrescribed . getText ( ) ) ) ) { if ( position == 2 ) score = 1 ; else score = 0 ; } TextView scoreText = ( ( TextView ) ( ( ( android . view . ViewGroup ) ( ( ( android . view . ViewGroup ) ( parent . getParent ( ) . getParent ( ) ) ) . getChildAt ( 4 ) ) ) . getChildAt ( 0 ) ) ) ; scoreText . setText ( ( ( String ) ( Integer . toString ( score ) ) ) ) ; TableLayout table = ( ( TableLayout ) ( LayoutUtils . findParentRecursively ( parent , register2Table ) ) ) ; float totalScore = 0.0F ; for ( int i = 1 ; i < ( ( ( android . view . ViewGroup ) ( table ) ) . getChildCount ( ) ) ; i ++ ) { TableRow row = ( ( TableRow ) ( table . getChildAt ( i ) ) ) ; TextView scoreCell = ( ( TextView ) ( ( ( android . view . ViewGroup ) ( row . getChildAt ( 4 ) ) ) . getChildAt ( 0 ) ) ) ; String stringFloat = scoreCell . getText ( ) . toString ( ) ; if ( ! ( "" . equals ( scoreCell . getText ( ) ) ) ) totalScore += Float . parseFloat ( stringFloat ) ; } LinearLayout root = ( ( LinearLayout ) ( LayoutUtils . findParentRecursively ( parent , Grid ) ) ) ; TextView totalScoreView = ( ( TextView ) ( root . findViewById ( adherenceScore ) ) ) ; totalScore = ( totalScore * 100.0F ) // 20.0F ; LayoutUtils . trafficLight ( totalScoreView , totalScore ) ; <START_BUG> totalScoreView . setText ( Utils . round ( ( ( totalScore * 100.0F ) // 20.0F ) ) ) ; <END_BUG> } @ Override public void onNothingSelected ( AdapterView < ? > parent ) { } } ; return listener ; } public static void createAdherenceSwitchListener ( Switch switchView ) { } public static OnItemSelectedListener createIQAListener ( View view , int opositeTableLayout , int matchTableLayout ) { } public static TextWatcher createReportingListener ( final Activity myActivity ) { } }

Fix:
totalScoreView . setText ( Utils . round ( totalScore ) ) ;