Buggy code:
public class ChannelEpg extends BaseListFragment implements LoaderCallbacks < Cursor > , PopupMenu . OnMenuItemClickListener , OnClickListener , OnItemClickListener { public static final String KEY_EPG_DAY = "EPG_DAY" ; ChannelEpg . ChannelEPGAdapter mAdapter ; Channel mCHannel ; ImageLoader mImageCacher ; int selectedPosition ; private ImageView channelLogo ; private TextView position ; private TextView channelName ; private TextView dayIndicator ; ChannelEpg . EpgDateInfo mDateInfo ; Date lastRefresh ; boolean useFavs ; @ Override public void onCreate ( Bundle savedInstanceState ) { } @ Override public void onAttach ( Context context ) { } @ Override public void onActivityCreated ( Bundle savedInstanceState ) { } @ Override public void setUserVisibleHint ( boolean isVisibleToUser ) { } @ Override public Loader < Cursor > onCreateLoader ( int arg0 , Bundle arg1 ) { } @ Override public void onLoadFinished ( Loader < Cursor > arg0 , Cursor cursor ) { } @ Override public View onCreateView ( LayoutInflater inflater , ViewGroup container , Bundle savedInstanceState ) { } private class ViewHolder { TextView startTime ; TextView title ; TextView description ; ImageView contextMenu ; } @ Override public void onItemClick ( AdapterView < ? > parent , View view , int position , long id ) { } private IEPG cursorToEpgEntry ( Cursor c ) { } public void setChannel ( Channel channel ) { } public Channel getChannel ( ) { } public class ChannelEPGAdapter extends CursorAdapter { Context mContext ; public ChannelEPGAdapter ( Context context ) { } @ Override public void bindView ( View view , Context context , Cursor c ) { } @ Override public View newView ( Context context , Cursor cursor , ViewGroup parent ) { } } public class ToolbarActionClickListener implements Toolbar . OnMenuItemClickListener { @ Override public boolean onMenuItemClick ( MenuItem menuItem ) { return false ; } } public void refresh ( boolean force ) { } public void refreshDate ( ) { } @ Override public void onSaveInstanceState ( Bundle outState ) { } @ Override public void onCreateOptionsMenu ( Menu menu , MenuInflater inflater ) { } @ Override public boolean onContextItemSelected ( MenuItem item ) { } private String buildTimerUrl ( Timer timer ) { } @ Override public void onCreateContextMenu ( ContextMenu menu , View v , ContextMenuInfo menuInfo ) { } @ Override public void onClick ( View v ) { } @ Override public boolean onMenuItemClick ( MenuItem item ) { final Cursor c = mAdapter . getCursor ( ) ; c . moveToPosition ( selectedPosition ) ; final int pos = selectedPosition ; Timer timer ; switch ( item . getItemId ( ) ) { case id . menuRecord : timer = cursorToTimer ( c ) ; String url = buildTimerUrl ( timer ) ; RecordingServiceGet rsGet = new RecordingServiceGet ( url ) ; Thread executionThread = new Thread ( rsGet ) ; executionThread . start ( ) ; return true ; case id . menuTimer : timer = cursorToTimer ( c ) ; if ( UIUtils . isTablet ( getActivity ( ) ) ) { TimerDetails timerdetails = TimerDetails . newInstance ( ) ; Bundle args = new Bundle ( ) ; args . putString ( EXTRA_TITLE , timer . getTitle ( ) ) ; args . putString ( EXTRA_CHANNEL_NAME , timer . getChannelName ( ) ) ; args . putLong ( EXTRA_CHANNEL_ID , timer . getChannelId ( ) ) ; args . putLong ( EXTRA_START , timer . getStart ( ) . getTime ( ) ) ; args . putLong ( EXTRA_END , timer . getEnd ( ) . getTime ( ) ) ; args . putInt ( EXTRA_ACTION , timer . getTimerAction ( ) ) ; args . putBoolean ( EXTRA_ACTIVE , true ) ; timerdetails . setArguments ( args ) ; timerdetails . show ( getActivity ( ) . getSupportFragmentManager ( ) , TimerDetails . class . getName ( ) ) ; } else { Intent timerIntent = new Intent ( getActivity ( ) , TimerDetailsActivity . class ) ; timerIntent . putExtra ( EXTRA_TITLE , timer . getTitle ( ) ) ; timerIntent . putExtra ( EXTRA_CHANNEL_NAME , timer . getChannelName ( ) ) ; timerIntent . putExtra ( EXTRA_CHANNEL_ID , timer . getChannelId ( ) ) ; timerIntent . putExtra ( EXTRA_START , timer . getStart ( ) . getTime ( ) ) ; timerIntent . putExtra ( EXTRA_END , timer . getEnd ( ) . getTime ( ) ) ; timerIntent . putExtra ( EXTRA_ACTIVE , true ) ; startActivity ( timerIntent ) ; } return true ; case id . menuDetails : Intent details = new Intent ( getActivity ( ) , IEpgDetailsActivity . class ) ; c . moveToPosition ( pos ) ; IEPG entry = cursorToEpgEntry ( c ) ; details . putExtra ( IEPG . class . getSimpleName ( ) , entry ) ; startActivity ( details ) ; return true ; case id . menuSwitch : DVBViewerPreferences prefs = new DVBViewerPreferences ( getActivity ( ) ) ; String cid = ":" + ( String . valueOf ( mCHannel . getChannelID ( ) ) ) ; <START_BUG> String switchRequest = MessageFormat . format ( URL_SWITCH_COMMAND , prefs . getString ( KEY_SELECTED_CLIENT ) , cid ) ; <END_BUG> DVBViewerCommand command = new DVBViewerCommand ( switchRequest ) ; Thread exexuterTHread = new Thread ( command ) ; exexuterTHread . start ( ) ; return true ; default : break ; } return false ; } public interface EpgDateInfo { void setEpgDate ( Date date ) { } Date getEpgDate ( ) { } } public void setDateInfo ( ChannelEpg . EpgDateInfo mDateInfo ) { } @ Override public void onLoaderReset ( Loader < Cursor > arg0 ) { } private Timer cursorToTimer ( Cursor c ) { } }

Fix:
String switchRequest = MessageFormat . format ( ( ( ServerConsts . REC_SERVICE_URL ) + ( ServerConsts . URL_SWITCH_COMMAND ) ) , prefs . getString ( KEY_SELECTED_CLIENT ) , cid ) ;