Buggy code:
public class PlayerState implements Parcelable { public enum PlayerSubscriptionType { none ( '-' ) , on_change ( '0' ) , real_time ( '1' ) ; private char mToken ; private PlayerSubscriptionType ( char token ) { } @ Override public String toString ( ) { } } public PlayerState ( ) { } public static final Creator < PlayerState > CREATOR = new Creator < PlayerState > ( ) { @ Override public PlayerState [ ] newArray ( int size ) { } @ Override public PlayerState createFromParcel ( Parcel source ) { } } ; private PlayerState ( Parcel source ) { } @ Override public void writeToParcel ( Parcel dest , int flags ) { } @ Override public int describeContents ( ) { } private String playerId ; private boolean poweredOn ; private PlayerState . PlayStatus playStatus ; private PlayerState . ShuffleStatus shuffleStatus ; private PlayerState . RepeatStatus repeatStatus ; private Song currentSong ; private String currentPlaylist ; private int currentPlaylistIndex ; private int currentTimeSecond ; private int currentSongDuration ; private int currentVolume ; private int sleepDuration ; private int sleep ; @ Nullable private String mSyncMaster ; private ImmutableList < String > mSyncSlaves = new ImmutableList . Builder < String > ( ) . build ( ) ; @ NonNull private PlayerState . PlayerSubscriptionType mPlayerSubscriptionType = PlayerState . PlayerSubscriptionType . none ; public boolean isPlaying ( ) { } public PlayerState . PlayStatus getPlayStatus ( ) { } public boolean setPlayStatus ( PlayerState . PlayStatus state ) { } public boolean setPlayStatus ( String s ) { } public String getPlayerId ( ) { } public void setPlayerId ( String playerId ) { } public boolean getPoweredOn ( ) { } public boolean isPoweredOn ( ) { } public boolean setPoweredOn ( boolean state ) { } public PlayerState . ShuffleStatus getShuffleStatus ( ) { } public boolean setShuffleStatus ( PlayerState . ShuffleStatus status ) { } public boolean setShuffleStatus ( String s ) { } public PlayerState . RepeatStatus getRepeatStatus ( ) { } public boolean setRepeatStatus ( PlayerState . RepeatStatus status ) { } public boolean setRepeatStatus ( String s ) { } public Song getCurrentSong ( ) { } public String getCurrentSongName ( ) { } public boolean setCurrentSong ( Song song ) { <START_BUG> if ( song == ( currentSong ) ) <END_BUG> return false ; currentSong = song ; return true ; } public String getCurrentPlaylist ( ) { } public int getCurrentPlaylistIndex ( ) { } public boolean setCurrentPlaylist ( String playlist ) { } public boolean setCurrentPlaylistIndex ( int value ) { } public int getCurrentTimeSecond ( ) { } public boolean setCurrentTimeSecond ( int value ) { } public int getCurrentSongDuration ( ) { } public boolean setCurrentSongDuration ( int value ) { } public int getCurrentVolume ( ) { } public boolean setCurrentVolume ( int value ) { } public int getSleepDuration ( ) { } public boolean setSleepDuration ( int sleepDuration ) { } public int getSleep ( ) { } public boolean setSleep ( int sleep ) { } public boolean setSyncMaster ( @ Nullable String syncMaster ) { } @ Nullable public String getSyncMaster ( ) { } public boolean setSyncSlaves ( @ NonNull List < String > syncSlaves ) { } public ImmutableList < String > getSyncSlaves ( ) { } public PlayerState . PlayerSubscriptionType getSubscriptionType ( ) { } public boolean setSubscriptionType ( @ Nullable String type ) { } public boolean setSubscriptionType ( @ NonNull PlayerState . PlayerSubscriptionType type ) { } public static enum PlayStatus { play , pause , stop ; } public static enum ShuffleStatus implements PlayerState . EnumWithId { SHUFFLE_OFF ( 0 , attr . ic_action_av_shuffle_off , ServerString . SHUFFLE_OFF ) , SHUFFLE_SONG ( 1 , attr . ic_action_av_shuffle_song , ServerString . SHUFFLE_ON_SONGS ) , SHUFFLE_ALBUM ( 2 , attr . ic_action_av_shuffle_album , ServerString . SHUFFLE_ON_ALBUMS ) ; private final int id ; private final int icon ; private final ServerString text ; private static final PlayerState . EnumIdLookup < PlayerState . ShuffleStatus > lookup = new PlayerState . EnumIdLookup < PlayerState . ShuffleStatus > ( PlayerState . ShuffleStatus . class ) ; private ShuffleStatus ( int id , int icon , ServerString text ) { } @ Override public int getId ( ) { } public int getIcon ( ) { } public ServerString getText ( ) { } public static PlayerState . ShuffleStatus valueOf ( int id ) { } } public static enum RepeatStatus implements PlayerState . EnumWithId { REPEAT_OFF ( 0 , attr . ic_action_av_repeat_off , ServerString . REPEAT_OFF ) , REPEAT_ONE ( 1 , attr . ic_action_av_repeat_one , ServerString . REPEAT_ONE ) , REPEAT_ALL ( 2 , attr . ic_action_av_repeat_all , ServerString . REPEAT_ALL ) ; private final int id ; private final int icon ; private final ServerString text ; private static final PlayerState . EnumIdLookup < PlayerState . RepeatStatus > lookup = new PlayerState . EnumIdLookup < PlayerState . RepeatStatus > ( PlayerState . RepeatStatus . class ) ; private RepeatStatus ( int id , int icon , ServerString text ) { } @ Override public int getId ( ) { } public int getIcon ( ) { } public ServerString getText ( ) { } public static PlayerState . RepeatStatus valueOf ( int id ) { } } public interface EnumWithId { int getId ( ) { } } public static class EnumIdLookup < E extends Enum < E > & PlayerState . EnumWithId > { private final SparseArray < E > map = new SparseArray < E > ( ) ; public EnumIdLookup ( Class < E > enumType ) { } public E get ( int num ) { } } }

Fix:
if ( song . equals ( currentSong ) )