Program: 47187
Project: 47187
Buggy source:
/** 
 * Returns an XML (DIDL) representation of the DLNA node. It gives a complete representation of the item, with as many tags as available. Recommendations as per UPNP specification are followed where possible.
 * @param mediaRenderer Media Renderer for which to represent this information. Useful for some hacks.
 * @return String representing the item. An example would start like this:{@code <container id="0$1" childCount="1" parentID="0" restricted="true">}
 */
public final String getDidlString(RendererConfiguration mediaRenderer){
  PmsConfiguration configuration=PMS.getConfiguration(mediaRenderer);
  StringBuilder sb=new StringBuilder();
  boolean subsAreValidForStreaming=false;
  if (!isFolder()) {
    if (format != null && format.isVideo()) {
      if (!configuration.isDisableSubtitles() && player == null && media_subtitle != null && media_subtitle.isStreamable()) {
        subsAreValidForStreaming=true;
        LOGGER.trace("String_Node_Str" + media_subtitle.getExternalFile().getName());
      }
 else       if (subsAreValidForStreaming) {
        LOGGER.trace("String_Node_Str" + getName());
      }
 else {
        LOGGER.trace("String_Node_Str" + getName());
      }
    }
    openTag(sb,"String_Node_Str");
  }
 else {
    openTag(sb,"String_Node_Str");
  }
  addAttribute(sb,"String_Node_Str",getResourceId());
  if (isFolder()) {
    if (!isDiscovered() && childrenNumber() == 0) {
      addAttribute(sb,"String_Node_Str",1);
    }
 else {
      addAttribute(sb,"String_Node_Str",childrenNumber());
    }
  }
  addAttribute(sb,"String_Node_Str",getParentId());
  addAttribute(sb,"String_Node_Str","String_Node_Str");
  endTag(sb);
  StringBuilder wireshark=new StringBuilder();
  final DLNAMediaAudio firstAudioTrack=media != null ? media.getFirstAudioTrack() : null;
  String title;
  if (firstAudioTrack != null && StringUtils.isNotBlank(firstAudioTrack.getSongname()) && getFormat() != null && getFormat().isAudio()) {
    title=firstAudioTrack.getSongname() + (player != null && !configuration.isHideEngineNames() ? ("String_Node_Str" + player.name() + "String_Node_Str") : "String_Node_Str");
  }
 else {
    title=(isFolder() || subsAreValidForStreaming) ? getDisplayName(null,false) : mediaRenderer.getUseSameExtension(getDisplayName(mediaRenderer,false));
  }
  title=resumeStr(title);
  addXMLTagAndAttribute(sb,"String_Node_Str",encodeXML(mediaRenderer.getDcTitle(title,nameSuffix,this)));
  wireshark.append("String_Node_Str").append(title).append("String_Node_Str");
  if (firstAudioTrack != null) {
    if (StringUtils.isNotBlank(firstAudioTrack.getAlbum())) {
      addXMLTagAndAttribute(sb,"String_Node_Str",encodeXML(firstAudioTrack.getAlbum()));
    }
    if (StringUtils.isNotBlank(firstAudioTrack.getArtist())) {
      addXMLTagAndAttribute(sb,"String_Node_Str",encodeXML(firstAudioTrack.getArtist()));
      addXMLTagAndAttribute(sb,"String_Node_Str",encodeXML(firstAudioTrack.getArtist()));
    }
    if (StringUtils.isNotBlank(firstAudioTrack.getGenre())) {
      addXMLTagAndAttribute(sb,"String_Node_Str",encodeXML(firstAudioTrack.getGenre()));
    }
    if (firstAudioTrack.getTrack() > 0) {
      addXMLTagAndAttribute(sb,"String_Node_Str","String_Node_Str" + firstAudioTrack.getTrack());
    }
  }
  if (!isFolder()) {
    int indexCount=1;
    if (mediaRenderer.isDLNALocalizationRequired()) {
      indexCount=getDLNALocalesCount();
    }
    for (int c=0; c < indexCount; c++) {
      openTag(sb,"String_Node_Str");
      addAttribute(sb,"String_Node_Str","String_Node_Str");
      String dlnaOrgPnFlags=getDlnaOrgPnFlags(mediaRenderer,c);
      String tempString="String_Node_Str" + getRendererMimeType(mediaRenderer) + "String_Node_Str"+ (dlnaOrgPnFlags != null ? (dlnaOrgPnFlags + "String_Node_Str") : "String_Node_Str")+ getDlnaOrgOpFlags(mediaRenderer);
      wireshark.append("String_Node_Str").append(tempString);
      addAttribute(sb,"String_Node_Str",tempString);
      if (subsAreValidForStreaming && !mediaRenderer.useClosedCaption()) {
        addAttribute(sb,"String_Node_Str",media_subtitle.getType().getExtension().toUpperCase());
        wireshark.append("String_Node_Str").append(media_subtitle.getType().getExtension().toUpperCase());
        addAttribute(sb,"String_Node_Str",getSubsURL(media_subtitle));
        wireshark.append("String_Node_Str").append(getSubsURL(media_subtitle));
      }
      if (getFormat() != null && getFormat().isVideo() && media != null && media.isMediaparsed()) {
        if (player == null && media != null) {
          wireshark.append("String_Node_Str").append(media.getSize());
          addAttribute(sb,"String_Node_Str",media.getSize());
        }
 else {
          long transcoded_size=mediaRenderer.getTranscodedSize();
          if (transcoded_size != 0) {
            wireshark.append("String_Node_Str").append(transcoded_size);
            addAttribute(sb,"String_Node_Str",transcoded_size);
          }
        }
        if (media.getDuration() != null) {
          if (getSplitRange().isEndLimitAvailable()) {
            wireshark.append("String_Node_Str").append(convertTimeToString(getSplitRange().getDuration(),DURATION_TIME_FORMAT));
            addAttribute(sb,"String_Node_Str",convertTimeToString(getSplitRange().getDuration(),DURATION_TIME_FORMAT));
          }
 else {
            wireshark.append("String_Node_Str").append(media.getDurationString());
            addAttribute(sb,"String_Node_Str",media.getDurationString());
          }
        }
        if (media.getResolution() != null) {
          addAttribute(sb,"String_Node_Str",media.getResolution());
        }
        addAttribute(sb,"String_Node_Str",media.getRealVideoBitrate());
        if (firstAudioTrack != null) {
          if (firstAudioTrack.getAudioProperties().getNumberOfChannels() > 0) {
            addAttribute(sb,"String_Node_Str",firstAudioTrack.getAudioProperties().getNumberOfChannels());
          }
          if (firstAudioTrack.getSampleFrequency() != null) {
            addAttribute(sb,"String_Node_Str",firstAudioTrack.getSampleFrequency());
          }
        }
      }
 else       if (getFormat() != null && getFormat().isImage()) {
        if (media != null && media.isMediaparsed()) {
          wireshark.append("String_Node_Str").append(media.getSize());
          addAttribute(sb,"String_Node_Str",media.getSize());
          if (media.getResolution() != null) {
            addAttribute(sb,"String_Node_Str",media.getResolution());
          }
        }
 else {
          wireshark.append("String_Node_Str").append(length());
          addAttribute(sb,"String_Node_Str",length());
        }
      }
 else       if (getFormat() != null && getFormat().isAudio()) {
        if (media != null && media.isMediaparsed()) {
          addAttribute(sb,"String_Node_Str",media.getBitrate());
          if (media.getDuration() != null) {
            wireshark.append("String_Node_Str").append(convertTimeToString(media.getDuration(),DURATION_TIME_FORMAT));
            addAttribute(sb,"String_Node_Str",convertTimeToString(media.getDuration(),DURATION_TIME_FORMAT));
          }
          if (firstAudioTrack != null && firstAudioTrack.getSampleFrequency() != null) {
            addAttribute(sb,"String_Node_Str",firstAudioTrack.getSampleFrequency());
          }
          if (firstAudioTrack != null) {
            addAttribute(sb,"String_Node_Str",firstAudioTrack.getAudioProperties().getNumberOfChannels());
          }
          if (player == null) {
            wireshark.append("String_Node_Str").append(media.getSize());
            addAttribute(sb,"String_Node_Str",media.getSize());
          }
 else {
            if (firstAudioTrack != null) {
              int defaultFrequency=mediaRenderer.isTranscodeAudioTo441() ? 44100 : 48000;
              if (!configuration.isAudioResample()) {
                try {
                  defaultFrequency=firstAudioTrack.getSampleRate();
                }
 catch (                Exception e) {
                  LOGGER.debug("String_Node_Str",e);
                }
              }
              int na=firstAudioTrack.getAudioProperties().getNumberOfChannels();
              if (na > 2) {
                na=2;
              }
              int finalSize=(int)(media.getDurationInSeconds() * defaultFrequency * 2* na);
              LOGGER.trace("String_Node_Str" + getSystemName() + "String_Node_Str"+ finalSize);
              wireshark.append("String_Node_Str").append(finalSize);
              addAttribute(sb,"String_Node_Str",finalSize);
            }
          }
        }
 else {
          wireshark.append("String_Node_Str").append(length());
          addAttribute(sb,"String_Node_Str",length());
        }
      }
 else {
        wireshark.append("String_Node_Str").append(DLNAMediaInfo.TRANS_SIZE).append("String_Node_Str");
        addAttribute(sb,"String_Node_Str",DLNAMediaInfo.TRANS_SIZE);
        addAttribute(sb,"String_Node_Str","String_Node_Str");
        addAttribute(sb,"String_Node_Str","String_Node_Str");
      }
      endTag(sb);
      wireshark.append("String_Node_Str").append(getFileURL());
      LOGGER.trace("String_Node_Str" + wireshark.toString());
      wireshark.setLength(0);
      sb.append(getFileURL());
      closeTag(sb,"String_Node_Str");
    }
  }
  if (subsAreValidForStreaming) {
    String subsURL=getSubsURL(media_subtitle);
    if (mediaRenderer.useClosedCaption()) {
      openTag(sb,"String_Node_Str");
      addAttribute(sb,"String_Node_Str","String_Node_Str");
      endTag(sb);
      sb.append(subsURL);
      closeTag(sb,"String_Node_Str");
      LOGGER.trace("String_Node_Str" + subsURL);
    }
 else {
      openTag(sb,"String_Node_Str");
      String format=media_subtitle.getType().getExtension();
      if (StringUtils.isBlank(format)) {
        format="String_Node_Str";
      }
      addAttribute(sb,"String_Node_Str","String_Node_Str" + format + "String_Node_Str");
      endTag(sb);
      sb.append(subsURL);
      closeTag(sb,"String_Node_Str");
      LOGGER.trace("String_Node_Str" + format + "String_Node_Str"+ subsURL);
    }
  }
  if (!(isFolder() && !mediaRenderer.isSendFolderThumbnails())) {
    appendThumbnail(mediaRenderer,sb,"String_Node_Str");
    appendThumbnail(mediaRenderer,sb,"String_Node_Str");
  }
  if (getLastModified() > 0 && mediaRenderer.isSendDateMetadata()) {
    addXMLTagAndAttribute(sb,"String_Node_Str",SDF_DATE.format(new Date(getLastModified())));
  }
  String uclass;
  if (first != null && media != null && !media.isSecondaryFormatValid()) {
    uclass="String_Node_Str";
  }
 else {
    if (isFolder()) {
      uclass="String_Node_Str";
      boolean xbox360=mediaRenderer.isXbox360();
      if (xbox360 && getFakeParentId() != null && getFakeParentId().equals("String_Node_Str")) {
        uclass="String_Node_Str";
      }
 else       if (xbox360 && getFakeParentId() != null && getFakeParentId().equals("String_Node_Str")) {
        uclass="String_Node_Str";
      }
 else       if (xbox360 && getFakeParentId() != null && getFakeParentId().equals("String_Node_Str")) {
        uclass="String_Node_Str";
      }
 else       if (xbox360 && getFakeParentId() != null && getFakeParentId().equals("String_Node_Str")) {
        uclass="String_Node_Str";
      }
    }
 else     if (getFormat() != null && getFormat().isVideo()) {
      uclass="String_Node_Str";
    }
 else     if (getFormat() != null && getFormat().isImage()) {
      uclass="String_Node_Str";
    }
 else     if (getFormat() != null && getFormat().isAudio()) {
      uclass="String_Node_Str";
    }
 else {
      uclass="String_Node_Str";
    }
  }
  addXMLTagAndAttribute(sb,"String_Node_Str",uclass);
  if (isFolder()) {
    closeTag(sb,"String_Node_Str");
  }
 else {
    closeTag(sb,"String_Node_Str");
  }
  return sb.toString();
}

Fixed version (ground truth):
/** 
 * Returns an XML (DIDL) representation of the DLNA node. It gives a complete representation of the item, with as many tags as available. Recommendations as per UPNP specification are followed where possible.
 * @param mediaRenderer Media Renderer for which to represent this information. Useful for some hacks.
 * @return String representing the item. An example would start like this:{@code <container id="0$1" childCount="1" parentID="0" restricted="true">}
 */
public final String getDidlString(RendererConfiguration mediaRenderer){
  PmsConfiguration configuration=PMS.getConfiguration(mediaRenderer);
  StringBuilder sb=new StringBuilder();
  boolean subsAreValidForStreaming=false;
  if (!isFolder()) {
    if (format != null && format.isVideo()) {
      if (!configuration.isDisableSubtitles() && player == null && media_subtitle != null && media_subtitle.isStreamable()) {
        subsAreValidForStreaming=true;
        LOGGER.trace("String_Node_Str" + media_subtitle.getExternalFile().getName());
      }
 else       if (subsAreValidForStreaming) {
        LOGGER.trace("String_Node_Str" + getName());
      }
 else {
        LOGGER.trace("String_Node_Str" + getName());
      }
    }
    openTag(sb,"String_Node_Str");
  }
 else {
    openTag(sb,"String_Node_Str");
  }
  addAttribute(sb,"String_Node_Str",getResourceId());
  if (isFolder()) {
    if (!isDiscovered() && childrenNumber() == 0) {
      addAttribute(sb,"String_Node_Str",1);
    }
 else {
      addAttribute(sb,"String_Node_Str",childrenNumber());
    }
  }
  addAttribute(sb,"String_Node_Str",getParentId());
  addAttribute(sb,"String_Node_Str","String_Node_Str");
  endTag(sb);
  StringBuilder wireshark=new StringBuilder();
  final DLNAMediaAudio firstAudioTrack=media != null ? media.getFirstAudioTrack() : null;
  String title;
  if (firstAudioTrack != null && StringUtils.isNotBlank(firstAudioTrack.getSongname()) && getFormat() != null && getFormat().isAudio()) {
    title=firstAudioTrack.getSongname() + (player != null && !configuration.isHideEngineNames() ? ("String_Node_Str" + player.name() + "String_Node_Str") : "String_Node_Str");
  }
 else {
    title=(isFolder() || subsAreValidForStreaming) ? getDisplayName(null,false) : mediaRenderer.getUseSameExtension(getDisplayName(mediaRenderer,false));
  }
  title=resumeStr(title);
  addXMLTagAndAttribute(sb,"String_Node_Str",encodeXML(mediaRenderer.getDcTitle(title,nameSuffix,this)));
  wireshark.append("String_Node_Str").append(title).append("String_Node_Str");
  if (firstAudioTrack != null) {
    if (StringUtils.isNotBlank(firstAudioTrack.getAlbum())) {
      addXMLTagAndAttribute(sb,"String_Node_Str",encodeXML(firstAudioTrack.getAlbum()));
    }
    if (StringUtils.isNotBlank(firstAudioTrack.getArtist())) {
      addXMLTagAndAttribute(sb,"String_Node_Str",encodeXML(firstAudioTrack.getArtist()));
      addXMLTagAndAttribute(sb,"String_Node_Str",encodeXML(firstAudioTrack.getArtist()));
    }
    if (StringUtils.isNotBlank(firstAudioTrack.getGenre())) {
      addXMLTagAndAttribute(sb,"String_Node_Str",encodeXML(firstAudioTrack.getGenre()));
    }
    if (firstAudioTrack.getTrack() > 0) {
      addXMLTagAndAttribute(sb,"String_Node_Str","String_Node_Str" + firstAudioTrack.getTrack());
    }
  }
  if (!isFolder()) {
    int indexCount=1;
    if (mediaRenderer.isDLNALocalizationRequired()) {
      indexCount=getDLNALocalesCount();
    }
    for (int c=0; c < indexCount; c++) {
      openTag(sb,"String_Node_Str");
      addAttribute(sb,"String_Node_Str","String_Node_Str");
      String dlnaOrgPnFlags=getDlnaOrgPnFlags(mediaRenderer,c);
      String tempString="String_Node_Str" + getRendererMimeType(mediaRenderer) + "String_Node_Str"+ (dlnaOrgPnFlags != null ? (dlnaOrgPnFlags + "String_Node_Str") : "String_Node_Str")+ getDlnaOrgOpFlags(mediaRenderer);
      wireshark.append("String_Node_Str").append(tempString);
      addAttribute(sb,"String_Node_Str",tempString);
      if (subsAreValidForStreaming && !mediaRenderer.useClosedCaption()) {
        addAttribute(sb,"String_Node_Str",media_subtitle.getType().getExtension().toUpperCase());
        wireshark.append("String_Node_Str").append(media_subtitle.getType().getExtension().toUpperCase());
        addAttribute(sb,"String_Node_Str",getSubsURL(media_subtitle));
        wireshark.append("String_Node_Str").append(getSubsURL(media_subtitle));
      }
      if (getFormat() != null && getFormat().isVideo() && media != null && media.isMediaparsed()) {
        if (player == null && media != null) {
          wireshark.append("String_Node_Str").append(media.getSize());
          addAttribute(sb,"String_Node_Str",media.getSize());
        }
 else {
          long transcoded_size=mediaRenderer.getTranscodedSize();
          if (transcoded_size != 0) {
            wireshark.append("String_Node_Str").append(transcoded_size);
            addAttribute(sb,"String_Node_Str",transcoded_size);
          }
        }
        if (media.getDuration() != null) {
          if (getSplitRange().isEndLimitAvailable()) {
            wireshark.append("String_Node_Str").append(convertTimeToString(getSplitRange().getDuration(),DURATION_TIME_FORMAT));
            addAttribute(sb,"String_Node_Str",convertTimeToString(getSplitRange().getDuration(),DURATION_TIME_FORMAT));
          }
 else {
            wireshark.append("String_Node_Str").append(media.getDurationString());
            addAttribute(sb,"String_Node_Str",media.getDurationString());
          }
        }
        if (media.getResolution() != null) {
          if (player != null && mediaRenderer.isKeepAspectRatio()) {
            int scaleWidth=media.getWidth();
            int scaleHeight=media.getHeight();
            getResolutionForKeepAR(scaleWidth,scaleHeight);
            addAttribute(sb,"String_Node_Str",scaleWidth + "String_Node_Str" + scaleHeight);
          }
 else {
            addAttribute(sb,"String_Node_Str",media.getResolution());
          }
        }
        addAttribute(sb,"String_Node_Str",media.getRealVideoBitrate());
        if (firstAudioTrack != null) {
          if (firstAudioTrack.getAudioProperties().getNumberOfChannels() > 0) {
            addAttribute(sb,"String_Node_Str",firstAudioTrack.getAudioProperties().getNumberOfChannels());
          }
          if (firstAudioTrack.getSampleFrequency() != null) {
            addAttribute(sb,"String_Node_Str",firstAudioTrack.getSampleFrequency());
          }
        }
      }
 else       if (getFormat() != null && getFormat().isImage()) {
        if (media != null && media.isMediaparsed()) {
          wireshark.append("String_Node_Str").append(media.getSize());
          addAttribute(sb,"String_Node_Str",media.getSize());
          if (media.getResolution() != null) {
            addAttribute(sb,"String_Node_Str",media.getResolution());
          }
        }
 else {
          wireshark.append("String_Node_Str").append(length());
          addAttribute(sb,"String_Node_Str",length());
        }
      }
 else       if (getFormat() != null && getFormat().isAudio()) {
        if (media != null && media.isMediaparsed()) {
          addAttribute(sb,"String_Node_Str",media.getBitrate());
          if (media.getDuration() != null) {
            wireshark.append("String_Node_Str").append(convertTimeToString(media.getDuration(),DURATION_TIME_FORMAT));
            addAttribute(sb,"String_Node_Str",convertTimeToString(media.getDuration(),DURATION_TIME_FORMAT));
          }
          if (firstAudioTrack != null && firstAudioTrack.getSampleFrequency() != null) {
            addAttribute(sb,"String_Node_Str",firstAudioTrack.getSampleFrequency());
          }
          if (firstAudioTrack != null) {
            addAttribute(sb,"String_Node_Str",firstAudioTrack.getAudioProperties().getNumberOfChannels());
          }
          if (player == null) {
            wireshark.append("String_Node_Str").append(media.getSize());
            addAttribute(sb,"String_Node_Str",media.getSize());
          }
 else {
            if (firstAudioTrack != null) {
              int defaultFrequency=mediaRenderer.isTranscodeAudioTo441() ? 44100 : 48000;
              if (!configuration.isAudioResample()) {
                try {
                  defaultFrequency=firstAudioTrack.getSampleRate();
                }
 catch (                Exception e) {
                  LOGGER.debug("String_Node_Str",e);
                }
              }
              int na=firstAudioTrack.getAudioProperties().getNumberOfChannels();
              if (na > 2) {
                na=2;
              }
              int finalSize=(int)(media.getDurationInSeconds() * defaultFrequency * 2* na);
              LOGGER.trace("String_Node_Str" + getSystemName() + "String_Node_Str"+ finalSize);
              wireshark.append("String_Node_Str").append(finalSize);
              addAttribute(sb,"String_Node_Str",finalSize);
            }
          }
        }
 else {
          wireshark.append("String_Node_Str").append(length());
          addAttribute(sb,"String_Node_Str",length());
        }
      }
 else {
        wireshark.append("String_Node_Str").append(DLNAMediaInfo.TRANS_SIZE).append("String_Node_Str");
        addAttribute(sb,"String_Node_Str",DLNAMediaInfo.TRANS_SIZE);
        addAttribute(sb,"String_Node_Str","String_Node_Str");
        addAttribute(sb,"String_Node_Str","String_Node_Str");
      }
      endTag(sb);
      wireshark.append("String_Node_Str").append(getFileURL());
      LOGGER.trace("String_Node_Str" + wireshark.toString());
      wireshark.setLength(0);
      sb.append(getFileURL());
      closeTag(sb,"String_Node_Str");
    }
  }
  if (subsAreValidForStreaming) {
    String subsURL=getSubsURL(media_subtitle);
    if (mediaRenderer.useClosedCaption()) {
      openTag(sb,"String_Node_Str");
      addAttribute(sb,"String_Node_Str","String_Node_Str");
      endTag(sb);
      sb.append(subsURL);
      closeTag(sb,"String_Node_Str");
      LOGGER.trace("String_Node_Str" + subsURL);
    }
 else {
      openTag(sb,"String_Node_Str");
      String format=media_subtitle.getType().getExtension();
      if (StringUtils.isBlank(format)) {
        format="String_Node_Str";
      }
      addAttribute(sb,"String_Node_Str","String_Node_Str" + format + "String_Node_Str");
      endTag(sb);
      sb.append(subsURL);
      closeTag(sb,"String_Node_Str");
      LOGGER.trace("String_Node_Str" + format + "String_Node_Str"+ subsURL);
    }
  }
  if (!(isFolder() && !mediaRenderer.isSendFolderThumbnails())) {
    appendThumbnail(mediaRenderer,sb,"String_Node_Str");
    appendThumbnail(mediaRenderer,sb,"String_Node_Str");
  }
  if (getLastModified() > 0 && mediaRenderer.isSendDateMetadata()) {
    addXMLTagAndAttribute(sb,"String_Node_Str",SDF_DATE.format(new Date(getLastModified())));
  }
  String uclass;
  if (first != null && media != null && !media.isSecondaryFormatValid()) {
    uclass="String_Node_Str";
  }
 else {
    if (isFolder()) {
      uclass="String_Node_Str";
      boolean xbox360=mediaRenderer.isXbox360();
      if (xbox360 && getFakeParentId() != null && getFakeParentId().equals("String_Node_Str")) {
        uclass="String_Node_Str";
      }
 else       if (xbox360 && getFakeParentId() != null && getFakeParentId().equals("String_Node_Str")) {
        uclass="String_Node_Str";
      }
 else       if (xbox360 && getFakeParentId() != null && getFakeParentId().equals("String_Node_Str")) {
        uclass="String_Node_Str";
      }
 else       if (xbox360 && getFakeParentId() != null && getFakeParentId().equals("String_Node_Str")) {
        uclass="String_Node_Str";
      }
    }
 else     if (getFormat() != null && getFormat().isVideo()) {
      uclass="String_Node_Str";
    }
 else     if (getFormat() != null && getFormat().isImage()) {
      uclass="String_Node_Str";
    }
 else     if (getFormat() != null && getFormat().isAudio()) {
      uclass="String_Node_Str";
    }
 else {
      uclass="String_Node_Str";
    }
  }
  addXMLTagAndAttribute(sb,"String_Node_Str",uclass);
  if (isFolder()) {
    closeTag(sb,"String_Node_Str");
  }
 else {
    closeTag(sb,"String_Node_Str");
  }
  return sb.toString();
}