Buggy code:
public class MyStocksActivity extends AppCompatActivity implements LoaderManager . LoaderCallbacks < Cursor > { private static final int CURSOR_LOADER_ID = 0 ; boolean isConnected ; private CharSequence mTitle ; private Intent mServiceIntent ; private ItemTouchHelper mItemTouchHelper ; private QuoteCursorAdapter mCursorAdapter ; private Context mContext ; private Cursor mCursor ; @ Override protected void onCreate ( Bundle savedInstanceState ) { super . onCreate ( savedInstanceState ) ; mContext = this ; ConnectivityManager cm = ( ( ConnectivityManager ) ( mContext . getSystemService ( CONNECTIVITY_SERVICE ) ) ) ; NetworkInfo activeNetwork = cm . getActiveNetworkInfo ( ) ; isConnected = ( activeNetwork != null ) && ( activeNetwork . isConnectedOrConnecting ( ) ) ; setContentView ( activity_my_stocks ) ; mServiceIntent = new Intent ( this , StockIntentService . class ) ; if ( savedInstanceState == null ) { mServiceIntent . putExtra ( "tag" , "init" ) ; if ( isConnected ) { startService ( mServiceIntent ) ; } else { networkUnavailable ( ) ; } } RecyclerView recyclerView = ( ( RecyclerView ) ( findViewById ( recycler_view ) ) ) ; recyclerView . setLayoutManager ( new LinearLayoutManager ( this ) ) ; getLoaderManager ( ) . initLoader ( MyStocksActivity . CURSOR_LOADER_ID , null , this ) ; mCursorAdapter = new QuoteCursorAdapter ( this , null ) ; recyclerView . addOnItemTouchListener ( new RecyclerViewItemClickListener ( this , new RecyclerViewItemClickListener . OnItemClickListener ( ) { @ Override public void onItemClick ( View v , int position ) { Intent intent = new Intent ( mContext , GraphDetailActivity . class ) ; mCursor . moveToPosition ( position ) ; intent . putExtra ( getResources ( ) . getString ( symbol ) , mCursor . getString ( mCursor . getColumnIndex ( getResources ( ) . getString ( symbol ) ) ) ) ; mContext . startActivity ( intent ) ; } } ) ) ; recyclerView . setAdapter ( mCursorAdapter ) ; FloatingActionButton fab = ( ( FloatingActionButton ) ( findViewById ( fab ) ) ) ; fab . attachToRecyclerView ( recyclerView ) ; fab . setOnClickListener ( new View . OnClickListener ( ) { @ Override public void onClick ( View v ) { if ( isConnected ) { new MaterialDialog . Builder ( mContext ) . title ( symbol_search ) . content ( content_test ) . inputType ( TYPE_CLASS_TEXT ) . input ( input_hint , input_prefill , new MaterialDialog . InputCallback ( ) { @ Override public void onInput ( MaterialDialog dialog , CharSequence input ) { Cursor c = getContentResolver ( ) . query ( CONTENT_URI , new String [ ] { QuoteColumns . SYMBOL } , ( ( QuoteColumns . SYMBOL ) + "=<seq2seq4repair_space>?" ) , new String [ ] { input . toString ( ) } , null ) ; if ( ( c . getCount ( ) ) != 0 ) { Toast toast = Toast . makeText ( MyStocksActivity . this , "This<seq2seq4repair_space>stock<seq2seq4repair_space>is<seq2seq4repair_space>already<seq2seq4repair_space>saved!" , LENGTH_LONG ) ; toast . setGravity ( CENTER , CENTER , 0 ) ; toast . show ( ) ; return ; } else { mServiceIntent . putExtra ( "tag" , "add" ) ; <START_BUG> mServiceIntent . putExtra ( "symbol" , input . toString ( ) . toUpperCase ( ) ) ; <END_BUG> startService ( mServiceIntent ) ; } } } ) . show ( ) ; } else { networkUnavailable ( ) ; } } } ) ; ItemTouchHelper . Callback callback = new com . sam_chordas . android . stockhawk . touch_helper . SimpleItemTouchHelperCallback ( mCursorAdapter ) ; mItemTouchHelper = new ItemTouchHelper ( callback ) ; mItemTouchHelper . attachToRecyclerView ( recyclerView ) ; mTitle = getTitle ( ) ; if ( isConnected ) { long period = 3600L ; long flex = 10L ; String periodicTag = "periodic" ; PeriodicTask periodicTask = new PeriodicTask . Builder ( ) . setService ( StockTaskService . class ) . setPeriod ( period ) . setFlex ( flex ) . setTag ( periodicTag ) . setRequiredNetwork ( NETWORK_STATE_CONNECTED ) . setRequiresCharging ( false ) . build ( ) ; GcmNetworkManager . getInstance ( this ) . schedule ( periodicTask ) ; } } @ Override public void onResume ( ) { } public void restoreActionBar ( ) { } @ Override public boolean onCreateOptionsMenu ( Menu menu ) { } @ Override public boolean onOptionsItemSelected ( MenuItem item ) { } @ Override public Loader < Cursor > onCreateLoader ( int id , Bundle args ) { } @ Override public void onLoadFinished ( Loader < Cursor > loader , Cursor data ) { } @ Override public void onLoaderReset ( Loader < Cursor > loader ) { } public void networkUnavailable ( ) { } }

Fix:
mServiceIntent . putExtra ( "symbol" , input . toString ( ) . toUpperCase ( ) . trim ( ) ) ;