Buggy code:
private static DecimalFormat GIGA_BYTE_LOCALIZED_FORMAT = null ; private static DecimalFormat MEGA_BYTE_LOCALIZED_FORMAT = null ; private static DecimalFormat KILO_BYTE_LOCALIZED_FORMAT = null ; private static DecimalFormat BYTE_LOCALIZED_FORMAT = null ; public static final String EVENT_META_CHANGED = "github.daneren2005.dsub.EVENT_META_CHANGED" ; public static final String EVENT_PLAYSTATE_CHANGED = "github.daneren2005.dsub.EVENT_PLAYSTATE_CHANGED" ; public static final String AVRCP_PLAYSTATE_CHANGED = "com.android.music.playstatechanged" ; public static final String AVRCP_METADATA_CHANGED = "com.android.music.metachanged" ; private static OnAudioFocusChangeListener focusListener ; private static boolean pauseFocus = false ; private static boolean lowerFocus = false ; private static final char [ ] HEX_DIGITS = new char [ ] { '0' , '1' , '2' , '3' , '4' , '5' , '6' , '7' , '8' , '9' , 'a' , 'b' , 'c' , 'd' , 'e' , 'f' } ; private static Toast toast ; private Util ( ) { } public static boolean isOffline ( Context context ) { } public static void setOffline ( Context context , boolean offline ) { } public static boolean isScreenLitOnDownload ( Context context ) { } public static RepeatMode getRepeatMode ( Context context ) { } public static void setRepeatMode ( Context context , RepeatMode repeatMode ) { } public static boolean isScrobblingEnabled ( Context context ) { } public static void setActiveServer ( Context context , int instance ) { } public static int getActiveServer ( Context context ) { } public static int getServerCount ( Context context ) { } public static void removeInstanceName ( Context context , int instance , int activeInstance ) { } public static String getServerName ( Context context ) { } public static String getServerName ( Context context , int instance ) { } public static void setSelectedMusicFolderId ( Context context , String musicFolderId ) { } public static String getSelectedMusicFolderId ( Context context ) { } public static String getSelectedMusicFolderId ( Context context , int instance ) { } public static boolean getAlbumListsPerFolder ( Context context ) { } public static boolean getAlbumListsPerFolder ( Context context , int instance ) { } public static void setAlbumListsPerFolder ( Context context , boolean perFolder ) { } public static String getTheme ( Context context ) { } public static void setTheme ( Context context , String theme ) { } public static void applyTheme ( Context context , String theme ) { } public static boolean getDisplayTrack ( Context context ) { } public static int getMaxBitrate ( Context context ) { } public static int getMaxVideoBitrate ( Context context ) { } public static int getPreloadCount ( Context context ) { } public static int getCacheSizeMB ( Context context ) { } public static String getRestUrl ( Context context , String method ) { } public static String getRestUrl ( Context context , String method , boolean allowAltAddress ) { } public static String getRestUrl ( Context context , String method , int instance ) { } public static String getRestUrl ( Context context , String method , int instance , boolean allowAltAddress ) { } public static String getRestUrl ( Context context , String method , SharedPreferences prefs , int instance ) { } public static String getRestUrl ( Context context , String method , SharedPreferences prefs , int instance , boolean allowAltAddress ) { } public static String replaceInternalUrl ( Context context , String url ) { if ( ( url . indexOf ( "https" ) ) != ( - 1 ) ) { SharedPreferences prefs = Util . getPreferences ( context ) ; int instance = prefs . getInt ( PREFERENCES_KEY_SERVER_INSTANCE , 1 ) ; String internalUrl = prefs . getString ( ( ( Constants . PREFERENCES_KEY_SERVER_INTERNAL_URL ) + instance ) , null ) ; if ( ( internalUrl != null ) && ( ! ( "" . equals ( internalUrl ) ) ) ) { String externalUrl = prefs . getString ( ( ( Constants . PREFERENCES_KEY_SERVER_URL ) + instance ) , null ) ; url = url . replace ( internalUrl , externalUrl ) ; } } <START_BUG> return url . replace ( REST_CLIENT_ID , CHROMECAST_CLIENT_ID ) ; <END_BUG> } public static boolean isTagBrowsing ( Context context ) { } public static boolean isTagBrowsing ( Context context , int instance ) { } public static boolean isSyncEnabled ( Context context , int instance ) { } public static String getParentFromEntry ( Context context , MusicDirectory . Entry entry ) { } public static String openToTab ( Context context ) { } public static String getVideoPlayerType ( Context context ) { } public static SharedPreferences getPreferences ( Context context ) { } public static SharedPreferences getOfflineSync ( Context context ) { } public static String getSyncDefault ( Context context ) { } public static void setSyncDefault ( Context context , String defaultValue ) { } public static String getCacheName ( Context context , String name , String id ) { } public static String getCacheName ( Context context , int instance , String name , String id ) { } public static String getCacheName ( Context context , String name ) { } public static String getCacheName ( Context context , int instance , String name ) { } public static int offlineScrobblesCount ( Context context ) { } public static int offlineStarsCount ( Context context ) { } public static String parseOfflineIDSearch ( Context context , String id , String cacheLocation ) { } public static String parseOfflineIDSearch ( String id ) { } public static String getContentType ( HttpEntity entity ) { } public static int getRemainingTrialDays ( Context context ) { } public static boolean isCastProxy ( Context context ) { } public static byte [ ] toByteArray ( InputStream input ) throws IOException { } public static long copy ( InputStream input , OutputStream output ) throws IOException { } public static void renameFile ( File from , File to ) throws IOException { } public static void close ( Closeable closeable ) { } public static boolean delete ( File file ) { }

Fix:
return url . replace ( ( "c=" + ( Constants . REST_CLIENT_ID ) ) , ( "c=" + ( Constants . CHROMECAST_CLIENT_ID ) ) ) ;