Buggy code:
public class Database extends Activity { ArrayList < String > details = new ArrayList < String > ( ) ; ArrayAdapter < String > reminderAdapter ; String data = "" ; Button cancel_btn ; Button delete_btn ; SQLiteDatabase myDB = null ; SharedPreferences someData ; Editor editor ; @ Override public void onCreate ( Bundle savedInstanceState ) { super . onCreate ( savedInstanceState ) ; final String TableName = "myTable" ; someData = getSharedPreferences ( "SubLatLng" , 0 ) ; editor = someData . edit ( ) ; try { myDB = this . openOrCreateDatabase ( "ReminderDatabase" , MODE_PRIVATE , null ) ; myDB . execSQL ( ( ( "CREATE<seq2seq4repair_space>TABLE<seq2seq4repair_space>IF<seq2seq4repair_space>NOT<seq2seq4repair_space>EXISTS<seq2seq4repair_space>" + TableName ) + "<seq2seq4repair_space>(<seq2seq4repair_space>Subject<seq2seq4repair_space>VARCHAR<seq2seq4repair_space>,<seq2seq4repair_space>Description<seq2seq4repair_space>VARCHAR<seq2seq4repair_space>,<seq2seq4repair_space>Location<seq2seq4repair_space>VARCHAR<seq2seq4repair_space>,<seq2seq4repair_space>SDate<seq2seq4repair_space>VARCHAR<seq2seq4repair_space>,<seq2seq4repair_space>EDate<seq2seq4repair_space>VARCHAR<seq2seq4repair_space>,<seq2seq4repair_space>Lat<seq2seq4repair_space>NUMBER<seq2seq4repair_space>,<seq2seq4repair_space>Lon<seq2seq4repair_space>NUMBER<seq2seq4repair_space>,<seq2seq4repair_space>Time<seq2seq4repair_space>VARCHAR<seq2seq4repair_space>);" ) ) ; ContentValues values = new ContentValues ( ) ; values . put ( "Subject" , sub ) ; values . put ( "Description" , des ) ; values . put ( "Location" , address ) ; Log . e ( "TagRugby" , ( ( AddLocation . address ) + "address" ) ) ; values . put ( "Lon" , lng ) ; values . put ( "Lat" , lat ) ; values . put ( "SDate" , sdate ) ; values . put ( "EDate" , edate ) ; values . put ( "time" , time ) ; myDB . insert ( "myTable" , null , values ) ; editor . putString ( sub , ( ( ( AddLocation . lat ) + "<seq2seq4repair_space>" ) + ( AddLocation . lng ) ) ) ; editor . commit ( ) ; startService ( new Intent ( this , MyService . class ) ) ; Cursor c = myDB . rawQuery ( ( "SELECT<seq2seq4repair_space>*<seq2seq4repair_space>FROM<seq2seq4repair_space>" + TableName ) , null ) ; int Column1 = c . getColumnIndex ( "Subject" ) ; int Column2 = c . getColumnIndex ( "Description" ) ; int Column3 = c . getColumnIndex ( "Location" ) ; int Column4 = c . getColumnIndex ( "Lon" ) ; int Column5 = c . getColumnIndex ( "Lat" ) ; int Column6 = c . getColumnIndex ( "SDate" ) ; int Column8 = c . getColumnIndex ( "EDate" ) ; int Column7 = c . getColumnIndex ( "Time" ) ; c . moveToFirst ( ) ; if ( c != null ) { do { String subject = c . getString ( Column1 ) ; data = ( "Subject:" + subject ) + "\n" ; String desc = c . getString ( Column2 ) ; data = ( ( ( data ) + "Description:" ) + desc ) + "\n" ; String location = c . getString ( Column3 ) ; data = ( ( ( data ) + "Location:" ) + location ) + "\n" ; double Lon = c . getDouble ( Column4 ) ; data = ( ( ( data ) + "Longitude:" ) + Lon ) + "\n" ; double Lat = c . getDouble ( Column5 ) ; data = ( ( ( data ) + "Latitude:" ) + Lat ) + "\n" ; String sdate = c . getString ( Column6 ) ; data = ( ( ( data ) + "Start<seq2seq4repair_space>Date:" ) + sdate ) + "\n" ; String edate = c . getString ( Column8 ) ; data = ( ( ( data ) + "End<seq2seq4repair_space>Date:" ) + edate ) + "\n" ; String time = c . getString ( Column7 ) ; data = ( ( ( data ) + "Time:" ) + time ) + "\n" ; details . add ( data ) ; <START_BUG> editor . putString ( subject , ( ( Lat + "<seq2seq4repair_space>" ) + Lon ) ) ; <END_BUG> } while ( c . moveToNext ( ) ) ; editor . commit ( ) ; List < String > weekReminder = new ArrayList < String > ( details ) ; reminderAdapter = new ArrayAdapter < String > ( this , layout . text_view_reminder , id . list_txt , weekReminder ) ; final ListView lv = new ListView ( this ) ; lv . setPadding ( 20 , 20 , 20 , 20 ) ; lv . setOnItemClickListener ( new AdapterView . OnItemClickListener ( ) { @ Override public void onItemClick ( AdapterView < ? > adapterView , View view , int position , long l ) { String forecast = reminderAdapter . getItem ( position ) ; Toast . makeText ( Database . this , forecast , LENGTH_SHORT ) . show ( ) ; } } ) ; lv . setOnItemLongClickListener ( new AdapterView . OnItemLongClickListener ( ) { public boolean onItemLongClick ( AdapterView < ? > arg0 , View arg1 , final int pos , long id ) { final Dialog dialog = new Dialog ( Database . this ) ; dialog . setTitle ( "Delete" ) ; dialog . setContentView ( delete ) ; dialog . show ( ) ; cancel_btn = ( ( Button ) ( dialog . findViewById ( cancel ) ) ) ; cancel_btn . setOnClickListener ( new View . OnClickListener ( ) { @ Override public void onClick ( View v ) { dialog . dismiss ( ) ; } } ) ; delete_btn = ( ( Button ) ( dialog . findViewById ( del ) ) ) ; delete_btn . setOnClickListener ( new View . OnClickListener ( ) { @ Override public void onClick ( View v ) { String forecast = reminderAdapter . getItem ( pos ) ; String [ ] tokens = forecast . split ( "[:\n]" ) ; data = tokens [ 1 ] ; String [ ] whereArgs = new String [ ] { String . valueOf ( data ) } ; myDB . delete ( TableName , "Subject=?" , whereArgs ) ; Toast . makeText ( Database . this , "Reminder<seq2seq4repair_space>is<seq2seq4repair_space>deleted<seq2seq4repair_space>successfully" , LENGTH_SHORT ) . show ( ) ; dialog . dismiss ( ) ; editor . remove ( data ) ; editor . commit ( ) ; reminderAdapter . remove ( forecast ) ;

Fix:
editor . putString ( subject , ( ( ( ( ( ( ( ( Lat + "<seq2seq4repair_space>" ) + Lon ) + "<seq2seq4repair_space>" ) + sdate ) + "<seq2seq4repair_space>" ) + edate ) + "<seq2seq4repair_space>" ) + time ) ) ;