Buggy code:
public class SettingsActivity extends PreferenceActivity implements SharedPreferences . OnSharedPreferenceChangeListener { private static final String TAG = "PB-SettingsActivity" ; @ Inject IInstallWatchFace _installWatchFace ; @ Inject SharedPreferences _sharedPreferences ; @ Inject IGPSDataStore _dataStore ; @ Override public void onCreate ( Bundle savedInstanceState ) { super . onCreate ( savedInstanceState ) ; ( ( com . njackson . application . PebbleBikeApplication ) ( getApplication ( ) ) ) . inject ( this ) ; addPreferencesFromResource ( preferences ) ; Preference installPreference = findPreference ( "INSTALL_WATCHFACE" ) ; installPreference . setOnPreferenceClickListener ( new Preference . OnPreferenceClickListener ( ) { @ Override public boolean onPreferenceClick ( Preference preference ) { _installWatchFace . execute ( getApplicationContext ( ) , new ToastMessageMaker ( ) ) ; return true ; } } ) ; Preference resetPreference = findPreference ( "RESET_DATA" ) ; <START_BUG> installPreference . setOnPreferenceClickListener ( new Preference . OnPreferenceClickListener ( ) { <END_BUG> @ Override public boolean onPreferenceClick ( Preference preference ) { _dataStore . resetAllValues ( ) ; _dataStore . commit ( ) ; return true ; } } ) ; final ChangeLog cl = new ChangeLog ( this ) ; Preference changelog = findPreference ( "CHANGE_LOG" ) ; changelog . setOnPreferenceClickListener ( new Preference . OnPreferenceClickListener ( ) { @ Override public boolean onPreferenceClick ( Preference preference ) { cl . getFullLogDialog ( ) . show ( ) ; return true ; } } ) ; Preference pref = findPreference ( "PREF_PRESSURE_INFO" ) ; SensorManager mSensorManager = ( ( SensorManager ) ( getSystemService ( SENSOR_SERVICE ) ) ) ; if ( ( mSensorManager . getDefaultSensor ( TYPE_PRESSURE ) ) != null ) { pref . setSummary ( "Pressure<seq2seq4repair_space>sensor<seq2seq4repair_space>available" ) ; } else { pref . setSummary ( "No<seq2seq4repair_space>pressure<seq2seq4repair_space>sensor" ) ; } pref = findPreference ( "PREF_GEOID_HEIGHT_INFO" ) ; if ( ( _sharedPreferences . getFloat ( "GEOID_HEIGHT" , 0 ) ) != 0 ) { pref . setSummary ( ( ( "Correction:<seq2seq4repair_space>" + ( _sharedPreferences . getFloat ( "GEOID_HEIGHT" , 0 ) ) ) + "m" ) ) ; } else { pref . setSummary ( "No<seq2seq4repair_space>correction" ) ; } setHrmSummary ( ) ; if ( getPackageManager ( ) . hasSystemFeature ( FEATURE_BLUETOOTH_LE ) ) { Preference pref_hrm = findPreference ( "PREF_HRM" ) ; pref_hrm . setOnPreferenceClickListener ( new Preference . OnPreferenceClickListener ( ) { @ Override public boolean onPreferenceClick ( Preference preference ) { if ( preference . getKey ( ) . equals ( "PREF_HRM" ) ) { final Intent intent = new Intent ( getApplicationContext ( ) , HRMScanActivity . class ) ; startActivityForResult ( intent , 1 ) ; } return false ; } } ) ; } } protected void onActivityResult ( int requestCode , int resultCode , Intent data ) { } @ Override protected void onResume ( ) { } @ Override protected void onPause ( ) { } @ Override public void onSharedPreferenceChanged ( SharedPreferences sharedPreferences , String s ) { } private void setUnitsSummary ( ) { } private void setRefreshSummary ( ) { } private void setLoginJaypsSummary ( ) { } private void setLoginMmtSummary ( ) { } private void setLiveSummary ( ) { } private void setOruxMapsSummary ( ) { } private void setCanvasSummary ( ) { } private void setHrmSummary ( ) { } }

Fix:
resetPreference . setOnPreferenceClickListener ( new Preference . OnPreferenceClickListener ( ) {