Program: 62649
Project: 62649
Buggy source:
protected void updateCurrentURIFormatted(){
  String currentURI=null;
  SonosMetaData currentTrack=null;
  String coordinator=getCoordinator();
  ZonePlayerHandler coordinatorHandler=getHandlerByName(coordinator);
  if (coordinatorHandler != null) {
    if (getCurrentURI().contains("String_Node_Str")) {
      coordinatorHandler.updateMediaInfo();
    }
    currentURI=coordinatorHandler.getCurrentURI();
    currentTrack=coordinatorHandler.getTrackMetadata();
  }
 else {
    currentURI=getCurrentURI();
    currentTrack=getTrackMetadata();
  }
  if (currentURI != null) {
    String title=stateMap.get("String_Node_Str");
    String resultString=stateMap.get("String_Node_Str");
    boolean needsUpdating=false;
    if (opmlPartnerID != null && currentURI.contains("String_Node_Str")) {
      String stationID=StringUtils.substringBetween(currentURI,"String_Node_Str","String_Node_Str");
      String previousStationID=stateMap.get("String_Node_Str");
      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("String_Node_Str",stationID,"String_Node_Str");
        String url="String_Node_Str" + "String_Node_Str" + stationID + "String_Node_Str"+ opmlPartnerID+ "String_Node_Str"+ getMACAddress();
        String response=HttpUtil.executeUrl("String_Node_Str",url,SOCKET_TIMEOUT);
        if (lastOPMLQuery == null) {
          lastOPMLQuery=Calendar.getInstance();
        }
        lastOPMLQuery.setTime(new Date());
        if (response != null) {
          List<String> fields=SonosXMLParser.getRadioTimeFromXML(response);
          if (fields != null && fields.size() > 0) {
            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 + "String_Node_Str";
              }
            }
            needsUpdating=true;
          }
        }
      }
    }
 else {
      if (currentTrack != null && !currentTrack.getTitle().contains("String_Node_Str")) {
        if (currentTrack.getAlbumArtist().equals("String_Node_Str")) {
          resultString=currentTrack.getCreator() + "String_Node_Str" + currentTrack.getAlbum()+ "String_Node_Str"+ currentTrack.getTitle();
        }
 else {
          resultString=currentTrack.getAlbumArtist() + "String_Node_Str" + currentTrack.getAlbum()+ "String_Node_Str"+ currentTrack.getTitle();
        }
        needsUpdating=true;
      }
    }
    if (needsUpdating) {
      this.onValueReceived("String_Node_Str",(resultString != null) ? resultString : "String_Node_Str","String_Node_Str");
      this.onValueReceived("String_Node_Str",(title != null) ? title : "String_Node_Str","String_Node_Str");
    }
  }
}

Fixed version (ground truth):
protected void updateCurrentURIFormatted(){
  String currentURI=null;
  SonosMetaData currentTrack=null;
  String coordinator=getCoordinator();
  ZonePlayerHandler coordinatorHandler=getHandlerByName(coordinator);
  if (coordinatorHandler != null && coordinatorHandler != this) {
    if (getCurrentURI().contains("String_Node_Str")) {
      coordinatorHandler.updateMediaInfo();
    }
    currentURI=coordinatorHandler.getCurrentURI();
    currentTrack=coordinatorHandler.getTrackMetadata();
  }
 else {
    currentURI=getCurrentURI();
    currentTrack=getTrackMetadata();
  }
  if (currentURI != null) {
    String title=stateMap.get("String_Node_Str");
    String resultString=stateMap.get("String_Node_Str");
    boolean needsUpdating=false;
    if (opmlPartnerID != null && currentURI.contains("String_Node_Str")) {
      String stationID=StringUtils.substringBetween(currentURI,"String_Node_Str","String_Node_Str");
      String previousStationID=stateMap.get("String_Node_Str");
      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("String_Node_Str",stationID,"String_Node_Str");
        String url="String_Node_Str" + "String_Node_Str" + stationID + "String_Node_Str"+ opmlPartnerID+ "String_Node_Str"+ getMACAddress();
        String response=HttpUtil.executeUrl("String_Node_Str",url,SOCKET_TIMEOUT);
        if (lastOPMLQuery == null) {
          lastOPMLQuery=Calendar.getInstance();
        }
        lastOPMLQuery.setTime(new Date());
        if (response != null) {
          List<String> fields=SonosXMLParser.getRadioTimeFromXML(response);
          if (fields != null && fields.size() > 0) {
            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 + "String_Node_Str";
              }
            }
            needsUpdating=true;
          }
        }
      }
    }
 else {
      if (currentTrack != null && !currentTrack.getTitle().contains("String_Node_Str")) {
        if (currentTrack.getAlbumArtist().equals("String_Node_Str")) {
          resultString=currentTrack.getCreator() + "String_Node_Str" + currentTrack.getAlbum()+ "String_Node_Str"+ currentTrack.getTitle();
        }
 else {
          resultString=currentTrack.getAlbumArtist() + "String_Node_Str" + currentTrack.getAlbum()+ "String_Node_Str"+ currentTrack.getTitle();
        }
        needsUpdating=true;
      }
    }
    if (needsUpdating) {
      this.onValueReceived("String_Node_Str",(resultString != null) ? resultString : "String_Node_Str","String_Node_Str");
      this.onValueReceived("String_Node_Str",(title != null) ? title : "String_Node_Str","String_Node_Str");
    }
  }
}