Buggy code:
@ TargetApi ( VERSION_CODES . FROYO ) public class Formatter implements OnSharedPreferenceChangeListener { Context context = null ; Resources resources = null ; SharedPreferences sharedPreferences = null ; DateFormat dateFormat = null ; DateFormat timeFormat = null ; HRZones hrZones = null ; boolean km = true ; String base_unit = "km" ; double base_meters = Formatter . km_meters ; public static final double km_meters = 1000.0 ; public static final double mi_meters = 1609.34 ; public static final double FEETS_PER_METER = 3.2808 ; public static final int CUE = 1 ; public static final int CUE_SHORT = 2 ; public static final int CUE_LONG = 3 ; public static final int TXT = 4 ; public static final int TXT_SHORT = 5 ; public static final int TXT_LONG = 6 ; public Formatter ( Context ctx ) { } @ Override public void onSharedPreferenceChanged ( SharedPreferences sharedPreferences , String key ) { } private void setUnit ( ) { } public static boolean getUseKilometers ( Resources res , SharedPreferences prefs , Editor editor ) { } private static boolean guessDefaultUnit ( Resources res , SharedPreferences prefs , Editor editor ) { } public double getUnitMeters ( ) { } public static double getUnitMeters ( Resources res , SharedPreferences prefs ) { } public String getUnitString ( ) { } public String format ( int target , Dimension dimension , double value ) { } public String formatElapsedTime ( int target , long seconds ) { } private String cueElapsedTime ( long seconds , boolean includeDimension ) { } private String txtElapsedTime ( long seconds ) { } public String formatHeartRate ( int target , double heart_rate ) { switch ( target ) { case Formatter . CUE : case Formatter . CUE_SHORT : case Formatter . CUE_LONG : <START_BUG> return ( ( Integer . toString ( ( ( int ) ( Math . round ( heart_rate ) ) ) ) ) + "<seq2seq4repair_space>" ) + ( resources . getQuantityString ( ( ( int ) ( heart_rate ) ) , metrics_beatsperminute ) ) ; <END_BUG> case Formatter . TXT : case Formatter . TXT_SHORT : case Formatter . TXT_LONG : return Integer . toString ( ( ( int ) ( Math . round ( heart_rate ) ) ) ) ; } return "" ; } private String formatHeartRateZone ( int target , double hrZone ) { } public String formatPace ( int target , double seconds_per_meter ) { } private String txtPace ( double seconds_per_meter , boolean includeUnit ) { } private String cuePace ( double seconds_per_meter ) { } public String formatSpeed ( int target , double seconds_per_meter ) { } private String txtSpeed ( double seconds_per_meter , boolean includeUnit ) { } private String cueSpeed ( double seconds_per_meter ) { } public String formatDateTime ( int target , long seconds_since_epoch ) { } public String formatDistance ( int target , long meters ) { } private String cueDistance ( long meters , boolean txt ) { } public String formatRemaining ( int target , Dimension dimension , double value ) { } public String formatRemainingTime ( int target , double value ) { } public String formatRemainingDistance ( int target , double value ) { } public String formatName ( String first , String last ) { } public String formatTime ( int target , long seconds_since_epoch ) { } public static double round ( double base , double decimals ) { } public static double getUnitMeters ( Context mContext ) { } }

Fix:
return ( ( Integer . toString ( ( ( int ) ( Math . round ( heart_rate ) ) ) ) ) + "<seq2seq4repair_space>" ) + ( resources . getQuantityString ( cue_bpm , ( ( int ) ( heart_rate ) ) ) ) ;