Buggy code:
public class Preferences extends PreferenceActivity { public static final String KEY_NICK = "a" ; public static final String KEY_SAVE_MOBILE_INTERNET = "b" ; public static final String KEY_START_AFTER_BOOTING = "c" ; public static final String KEY_SEARCH_DEVELOPER_UPDATES = "d" ; @ Override public void onCreate ( Bundle savedInstanceState ) { } private PreferenceScreen createPreferenceHierarchy ( ) { PreferenceScreen root = getPreferenceManager ( ) . createPreferenceScreen ( this ) ; PreferenceCategory mainc = new PreferenceCategory ( this ) ; mainc . setTitle ( "General" ) ; root . addPreference ( mainc ) ; if ( BS . updateAbleViaWeb ) { Preference updateButton = new Preference ( this ) ; updateButton . setTitle ( "Search<seq2seq4repair_space>for<seq2seq4repair_space>update." ) ; updateButton . setSummary ( ( ( "Current<seq2seq4repair_space>version<seq2seq4repair_space>" + ( BS . VERSION ) ) + "." ) ) ; updateButton . setOnPreferenceClickListener ( new Preference . OnPreferenceClickListener ( ) { @ Override public boolean onPreferenceClick ( Preference arg0 ) { new Thread ( ) { @ Override public void run ( ) { SharedPreferences sharedPref = PreferenceManager . getDefaultSharedPreferences ( Preferences . this ) ; final boolean developerUpdates = sharedPref . getBoolean ( Preferences . KEY_SEARCH_DEVELOPER_UPDATES , false ) ; try { URL url = new URL ( ( "http:////files.redpanda.im//android//version" + ( developerUpdates ? "-developer" : "" ) ) ) ; BufferedReader in = new BufferedReader ( new InputStreamReader ( url . openStream ( ) ) ) ; String str ; while ( ( str = in . readLine ( ) ) != null ) { int v = Integer . parseInt ( str ) ; if ( v > ( BS . VERSION ) ) { runOnUiThread ( new Runnable ( ) { public void run ( ) { Toast . makeText ( Preferences . this , "Update<seq2seq4repair_space>found." , LENGTH_SHORT ) . show ( ) ; String url2 = ( "http:////files.redpanda.im//android//redPanda" + ( developerUpdates ? "-developer" : "" ) ) + ".apk" ; Intent i = new Intent ( Intent . ACTION_VIEW ) ; i . setData ( Uri . parse ( url2 ) ) ; startActivity ( i ) ; } } ) ; break ; } else { runOnUiThread ( new Runnable ( ) { public void run ( ) { Toast . makeText ( Preferences . this , "Latest<seq2seq4repair_space>version<seq2seq4repair_space>installed." , LENGTH_SHORT ) . show ( ) ; } } ) ; } } in . close ( ) ; } catch ( MalformedURLException e ) { } catch ( IOException e ) { } catch ( NumberFormatException e ) { } } } . start ( ) ; return true ; } } ) ; mainc . addPreference ( updateButton ) ; } else { Preference updateButton = new Preference ( this ) ; updateButton . setTitle ( "Search<seq2seq4repair_space>for<seq2seq4repair_space>update." ) ; updateButton . setSummary ( ( ( "Current<seq2seq4repair_space>version<seq2seq4repair_space>" + ( BS . VERSION ) ) + "." ) ) ; updateButton . setOnPreferenceClickListener ( new Preference . OnPreferenceClickListener ( ) { @ Override public boolean onPreferenceClick ( Preference arg0 ) { String url2 = "https:////play.google.com//store//apps//details?id=org.redPanda" ; Intent i = new Intent ( Intent . ACTION_VIEW ) ; i . setData ( Uri . parse ( url2 ) ) ; startActivity ( i ) ; return true ; } } ) ; mainc . addPreference ( updateButton ) ; } Preference fullSyncInit = new Preference ( this ) ; fullSyncInit . setTitle ( "Init<seq2seq4repair_space>new<seq2seq4repair_space>network<seq2seq4repair_space>discovery." ) ; fullSyncInit . setSummary ( "Initializes<seq2seq4repair_space>a<seq2seq4repair_space>full<seq2seq4repair_space>network<seq2seq4repair_space>discovery,<seq2seq4repair_space>may<seq2seq4repair_space>cause<seq2seq4repair_space>huge<seq2seq4repair_space>traffic." ) ; fullSyncInit . setOnPreferenceClickListener ( new Preference . OnPreferenceClickListener ( ) { public boolean onPreferenceClick ( Preference pref ) { Intent i = new Intent ( Preferences . this , BS . class ) ; i . setAction ( "c" ) ; i . putExtra ( "cmd" , "fullSync" ) ; startService ( i ) ; return true ; } } ) ; mainc . addPreference ( fullSyncInit ) ; Preference removeOldMessages = new Preference ( this ) ; removeOldMessages . setTitle ( "Remove<seq2seq4repair_space>old<seq2seq4repair_space>messages." ) ; <START_BUG> removeOldMessages . setSummary ( "Removes<seq2seq4repair_space>messages<seq2seq4repair_space>older<seq2seq4repair_space>then<seq2seq4repair_space>one<seq2seq4repair_space>week." ) ; <END_BUG> removeOldMessages . setOnPreferenceClickListener ( new Preference . OnPreferenceClickListener ( ) { public boolean onPreferenceClick ( Preference pref ) { Intent i = new Intent ( Preferences . this , BS . class ) ; i . setAction ( "c" ) ; i . putExtra ( "cmd" , "removeOldMessages" ) ; startService ( i ) ; return true ; } } ) ; mainc . addPreference ( removeOldMessages ) ; CheckBoxPreference saveMobileInternet = new CheckBoxPreference ( this ) ; saveMobileInternet . setDefaultValue ( false ) ; saveMobileInternet . setKey ( Preferences . KEY_SAVE_MOBILE_INTERNET ) ; saveMobileInternet . setTitle ( "Reduce<seq2seq4repair_space>traffic<seq2seq4repair_space>over<seq2seq4repair_space>2G//3G//4G." ) ; saveMobileInternet . setSummary ( ( "Doesn't<seq2seq4repair_space>stay<seq2seq4repair_space>connected<seq2seq4repair_space>over<seq2seq4repair_space>mobile<seq2seq4repair_space>internet.<seq2seq4repair_space>Messages<seq2seq4repair_space>may<seq2seq4repair_space>be<seq2seq4repair_space>delayed," + "<seq2seq4repair_space>but<seq2seq4repair_space>saves<seq2seq4repair_space>your<seq2seq4repair_space>mobile<seq2seq4repair_space>traffic." ) ) ; mainc . addPreference ( saveMobileInternet ) ; CheckBoxPreference startAfterBoot = new CheckBoxPreference ( this ) ; startAfterBoot . setDefaultValue ( true ) ; startAfterBoot . setKey ( Preferences . KEY_START_AFTER_BOOTING ) ; startAfterBoot . setTitle ( "Autostart." ) ; startAfterBoot . setSummary ( "If<seq2seq4repair_space>checked,<seq2seq4repair_space>this<seq2seq4repair_space>app<seq2seq4repair_space>will<seq2seq4repair_space>start<seq2seq4repair_space>after<seq2seq4repair_space>the<seq2seq4repair_space>system<seq2seq4repair_space>booted.<seq2seq4repair_space>(Recommended)" ) ; mainc . addPreference ( startAfterBoot ) ; CheckBoxPreference searchDeveloperUpdates = new CheckBoxPreference ( this ) ; searchDeveloperUpdates . setDefaultValue ( false ) ; searchDeveloperUpdates . setKey ( Preferences . KEY_SEARCH_DEVELOPER_UPDATES ) ; searchDeveloperUpdates . setTitle ( "Developer<seq2seq4repair_space>updates." ) ; searchDeveloperUpdates . setSummary ( "If<seq2seq4repair_space>checked,<seq2seq4repair_space>all<seq2seq4repair_space>available<seq2seq4repair_space>updates<seq2seq4repair_space>will<seq2seq4repair_space>be<seq2seq4repair_space>displayed.<seq2seq4repair_space>May<seq2seq4repair_space>be<seq2seq4repair_space>annoying." ) ; mainc . addPreference ( searchDeveloperUpdates ) ; Preference button = new Preference ( this ) ; button . setTitle ( "Add<seq2seq4repair_space>Main<seq2seq4repair_space>Channel" ) ; button . setSummary ( "Adds<seq2seq4repair_space>the<seq2seq4repair_space>Main<seq2seq4repair_space>Channel<seq2seq4repair_space>to<seq2seq4repair_space>your<seq2seq4repair_space>channel<seq2seq4repair_space>list." ) ; button . setOnPreferenceClickListener ( new Preference . OnPreferenceClickListener ( ) { @ Override public boolean onPreferenceClick ( Preference arg0 ) { Main . addMainChannel ( ) ; return true ; } } ) ; mainc . addPreference ( button ) ; Preference expbutton = new Preference ( this ) ; expbutton . setTitle ( "Export" ) ; expbutton . setSummary ( "Export<seq2seq4repair_space>channels<seq2seq4repair_space>and<seq2seq4repair_space>IDs<seq2seq4repair_space>to<seq2seq4repair_space>SD-card." ) ; expbutton . setOnPreferenceClickListener ( new Preference . OnPreferenceClickListener ( ) { @ Override public boolean onPreferenceClick ( Preference arg0 ) { AlertDialog . Builder builder = new AlertDialog . Builder ( Preferences . this ) ;

Fix:
removeOldMessages . setSummary ( "Removes<seq2seq4repair_space>messages<seq2seq4repair_space>older<seq2seq4repair_space>than<seq2seq4repair_space>one<seq2seq4repair_space>week." ) ;