Buggy code:
public class ZonePlayerHandler extends BaseThingHandler implements DiscoveryListener , UpnpIOParticipant { private Logger logger = LoggerFactory . getLogger ( ZonePlayerHandler . class ) ; private UpnpIOService service ; private DiscoveryServiceRegistry discoveryServiceRegistry ; private ScheduledFuture < ? > pollingJob ; private Calendar lastOPMLQuery = null ; private SonosZonePlayerState savedState = null ; private static final Collection < String > SERVICE_SUBSCRIPTIONS = Lists . newArrayList ( "DeviceProperties" , "AVTransport" , "ZoneGroupTopology" , "GroupManagement" , "RenderingControl" , "AudioIn" ) ; protected static final int SUBSCRIPTION_DURATION = 600 ; private static final int SOCKET_TIMEOUT = 5000 ; private static final int DEFAULT_REFRESH_INTERVAL = 60 ; private Map < String , String > stateMap = Collections . synchronizedMap ( new HashMap < String , String > ( ) ) ; private Runnable pollingRunnable = new Runnable ( ) { @ Override public void run ( ) { } } ; private String opmlPartnerID ; public ZonePlayerHandler ( Thing thing , UpnpIOService upnpIOService , DiscoveryServiceRegistry discoveryServiceRegistry , String opmlPartnerID ) { } @ Override public void dispose ( ) { } @ Override public void initialize ( ) { } @ Override public void thingDiscovered ( DiscoveryService source , DiscoveryResult result ) { } @ Override public void thingRemoved ( DiscoveryService source , ThingUID thingUID ) { } @ Override public void handleCommand ( ChannelUID channelUID , Command command ) { } private void restoreAllPlayerState ( ) { } private void saveAllPlayerState ( ) { } public void onValueReceived ( String variable , String value , String service ) { } private synchronized void onSubscription ( ) { } private synchronized void onUpdate ( ) { } protected void updateMediaInfo ( ) { } protected void updateCurrentZoneName ( ) { } protected void updateLed ( ) { } protected void updateTime ( ) { } protected void updatePosition ( ) { } protected void updateRunningAlarmProperties ( ) { } protected void updateZoneInfo ( ) { } public String getCoordinator ( ) { } public boolean isCoordinator ( ) { } protected void updateCurrentURIFormatted ( ) { String currentURI = null ; SonosMetaData currentTrack = null ; String coordinator = getCoordinator ( ) ; ZonePlayerHandler coordinatorHandler = getHandlerByName ( coordinator ) ; if ( ( ! ( isGroupCoordinator ( ) ) ) && ( coordinatorHandler != null ) ) { currentURI = coordinatorHandler . getCurrentURI ( ) ; currentTrack = coordinatorHandler . getTrackMetadata ( ) ; } else { currentURI = getCurrentURI ( ) ; currentTrack = getTrackMetadata ( ) ; } if ( currentURI != null ) { String resultString = null ; String artist = null ; String album = null ; String title = null ; if ( ( ( opmlPartnerID ) != null ) && ( currentURI . contains ( "x-sonosapi-stream" ) ) ) { String stationID = StringUtils . substringBetween ( currentURI , ":s" , "?sid" ) ; String previousStationID = stateMap . get ( "StationID" ) ; Calendar now = Calendar . getInstance ( ) ; now . setTime ( new Date ( ) ) ; now . add ( Calendar . MINUTE , ( - 1 ) ) ; if ( ( ( ( previousStationID == null ) || ( ! ( previousStationID . equals ( stationID ) ) ) ) || ( ( lastOPMLQuery ) == null ) ) || ( lastOPMLQuery . before ( now ) ) ) { this . onValueReceived ( "StationID" , stationID , "AVTransport" ) ; String url = ( ( ( ( ( "http:////opml.radiotime.com//Describe.ashx?c=nowplaying" + "&id=" ) + stationID ) + "&partnerId=" ) + ( opmlPartnerID ) ) + "&serial=" ) + ( getMACAddress ( ) ) ; String response = HttpUtil . executeUrl ( "GET" , url , ZonePlayerHandler . SOCKET_TIMEOUT ) ; if ( ( lastOPMLQuery ) == null ) { lastOPMLQuery = Calendar . getInstance ( ) ; } lastOPMLQuery . setTime ( new Date ( ) ) ; if ( response != null ) { List < String > fields = SonosXMLParser . getRadioTimeFromXML ( response ) ; <START_BUG> if ( fields != null ) { <END_BUG> resultString = new String ( ) ; title = fields . get ( 0 ) ; Iterator < String > listIterator = fields . listIterator ( ) ; while ( listIterator . hasNext ( ) ) { String field = listIterator . next ( ) ; resultString = resultString + field ; if ( listIterator . hasNext ( ) ) { resultString = resultString + "<seq2seq4repair_space>-<seq2seq4repair_space>" ; } } } } } else { resultString = stateMap . get ( "CurrentURIFormatted" ) ; title = stateMap . get ( "CurrentTitle" ) ; } } else { if ( currentTrack != null ) { if ( ! ( currentTrack . getTitle ( ) . contains ( "x-sonosapi-stream" ) ) ) { if ( currentTrack . getAlbumArtist ( ) . equals ( "" ) ) { resultString = ( ( ( ( currentTrack . getCreator ( ) ) + "<seq2seq4repair_space>-<seq2seq4repair_space>" ) + ( currentTrack . getAlbum ( ) ) ) + "<seq2seq4repair_space>-<seq2seq4repair_space>" ) + ( currentTrack . getTitle ( ) ) ; artist = currentTrack . getCreator ( ) ; } else { resultString = ( ( ( ( currentTrack . getAlbumArtist ( ) ) + "<seq2seq4repair_space>-<seq2seq4repair_space>" ) + ( currentTrack . getAlbum ( ) ) ) + "<seq2seq4repair_space>-<seq2seq4repair_space>" ) + ( currentTrack . getTitle ( ) ) ; artist = currentTrack . getAlbumArtist ( ) ; } album = currentTrack . getAlbum ( ) ; title = currentTrack . getTitle ( ) ; } } else { resultString = "" ; } } this . onValueReceived ( "CurrentURIFormatted" , resultString , "AVTransport" ) ; this . onValueReceived ( "CurrentArtist" , ( artist != null ? artist : "<seq2seq4repair_space>" ) , "AVTransport" ) ; this . onValueReceived ( "CurrentTitle" , ( title != null ? title : "<seq2seq4repair_space>" ) , "AVTransport" ) ; this . onValueReceived ( "CurrentAlbum" , ( album != null ? album : "<seq2seq4repair_space>" ) , "AVTransport" ) ; } }

Fix:
if ( ( fields != null ) && ( ( fields . size ( ) ) > 0 ) ) {