Program: 62652
Project: 62652
Buggy source:
/** 
 * Save the state (track, position etc) of the Sonos Zone player.
 * @return true if no error occurred.
 */
protected void saveState(){
synchronized (this) {
    savedState=new SonosZonePlayerState();
    String currentURI=getCurrentURI();
    if (currentURI != null) {
      if (currentURI.contains("String_Node_Str")) {
        SonosMetaData track=getTrackMetadata();
        SonosMetaData current=getCurrentURIMetadata();
        if (track != null) {
          savedState.entry=new SonosEntry("String_Node_Str",current.getTitle(),"String_Node_Str","String_Node_Str",track.getAlbumArtUri(),"String_Node_Str",current.getUpnpClass(),currentURI);
        }
      }
 else       if (currentURI.contains("String_Node_Str")) {
        savedState.entry=new SonosEntry("String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str",currentURI);
      }
 else       if (currentURI.contains("String_Node_Str")) {
        savedState.entry=new SonosEntry("String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str",currentURI);
      }
 else       if (currentURI.contains("String_Node_Str")) {
        SonosMetaData queued=getEnqueuedTransportURIMetaData();
        if (queued != null) {
          savedState.track=getCurrenTrackNr();
          if (queued.getUpnpClass().contains("String_Node_Str")) {
            List<SonosEntry> playLists=getPlayLists();
            for (            SonosEntry someList : playLists) {
              if (someList.getTitle().equals(queued.getTitle())) {
                savedState.entry=new SonosEntry(someList.getId(),someList.getTitle(),someList.getParentId(),"String_Node_Str","String_Node_Str","String_Node_Str",someList.getUpnpClass(),someList.getRes());
                break;
              }
            }
          }
 else           if (queued.getUpnpClass().contains("String_Node_Str")) {
            logger.debug("String_Node_Str",queued.getUpnpClass());
            String existingList="String_Node_Str";
            List<SonosEntry> playLists=getPlayLists();
            for (            SonosEntry someList : playLists) {
              if (someList.getTitle().equals("String_Node_Str" + getUDN())) {
                existingList=someList.getId();
                break;
              }
            }
            saveQueue("String_Node_Str" + getUDN(),existingList);
            playLists=getPlayLists();
            for (            SonosEntry someList : playLists) {
              if (someList.getTitle().equals("String_Node_Str" + getUDN())) {
                savedState.entry=new SonosEntry(someList.getId(),someList.getTitle(),someList.getParentId(),"String_Node_Str","String_Node_Str","String_Node_Str",someList.getUpnpClass(),someList.getRes());
                break;
              }
            }
          }
        }
 else {
          savedState.entry=new SonosEntry("String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str" + getUDN() + "String_Node_Str");
        }
      }
      savedState.transportState=getTransportState();
      savedState.volume=getVolume();
      savedState.relTime=getPosition();
    }
 else {
      savedState.entry=null;
    }
  }
}

Fixed version (ground truth):
/** 
 * Save the state (track, position etc) of the Sonos Zone player.
 * @return true if no error occurred.
 */
protected void saveState(){
synchronized (this) {
    savedState=new SonosZonePlayerState();
    String currentURI=getCurrentURI();
    savedState.transportState=getTransportState();
    savedState.volume=getVolume();
    if (currentURI != null) {
      if (currentURI.contains("String_Node_Str")) {
        SonosMetaData track=getTrackMetadata();
        SonosMetaData current=getCurrentURIMetadata();
        if (track != null) {
          savedState.entry=new SonosEntry("String_Node_Str",current.getTitle(),"String_Node_Str","String_Node_Str",track.getAlbumArtUri(),"String_Node_Str",current.getUpnpClass(),currentURI);
        }
      }
 else       if (currentURI.contains("String_Node_Str")) {
        savedState.entry=new SonosEntry("String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str",currentURI);
      }
 else       if (currentURI.contains("String_Node_Str")) {
        savedState.entry=new SonosEntry("String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str",currentURI);
      }
 else       if (currentURI.contains("String_Node_Str")) {
        SonosMetaData queued=getEnqueuedTransportURIMetaData();
        if (queued != null) {
          savedState.track=getCurrenTrackNr();
          if (queued.getUpnpClass().contains("String_Node_Str")) {
            List<SonosEntry> playLists=getPlayLists();
            for (            SonosEntry someList : playLists) {
              if (someList.getTitle().equals(queued.getTitle())) {
                savedState.entry=new SonosEntry(someList.getId(),someList.getTitle(),someList.getParentId(),"String_Node_Str","String_Node_Str","String_Node_Str",someList.getUpnpClass(),someList.getRes());
                break;
              }
            }
          }
 else           if (queued.getUpnpClass().contains("String_Node_Str")) {
            logger.debug("String_Node_Str",queued.getUpnpClass());
            String existingList="String_Node_Str";
            List<SonosEntry> playLists=getPlayLists();
            for (            SonosEntry someList : playLists) {
              if (someList.getTitle().equals("String_Node_Str" + getUDN())) {
                existingList=someList.getId();
                break;
              }
            }
            saveQueue("String_Node_Str" + getUDN(),existingList);
            playLists=getPlayLists();
            for (            SonosEntry someList : playLists) {
              if (someList.getTitle().equals("String_Node_Str" + getUDN())) {
                savedState.entry=new SonosEntry(someList.getId(),someList.getTitle(),someList.getParentId(),"String_Node_Str","String_Node_Str","String_Node_Str",someList.getUpnpClass(),someList.getRes());
                break;
              }
            }
          }
        }
 else {
          savedState.entry=new SonosEntry("String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str" + getUDN() + "String_Node_Str");
        }
      }
      savedState.relTime=getPosition();
    }
 else {
      savedState.entry=null;
    }
  }
}