Program: 110451
Project: 110451
Buggy source:
protected AdaptationSet parseAdaptationSet(XmlPullParser xpp,String baseUrl,long periodStartMs,long periodDurationMs,SegmentBase segmentBase) throws XmlPullParserException, IOException {
  String mimeType=xpp.getAttributeValue(null,"String_Node_Str");
  String language=xpp.getAttributeValue(null,"String_Node_Str");
  int contentType=parseAdaptationSetTypeFromMimeType(mimeType);
  int id=-1;
  ContentProtectionsBuilder contentProtectionsBuilder=new ContentProtectionsBuilder();
  List<Representation> representations=new ArrayList<>();
  do {
    xpp.next();
    if (isStartTag(xpp,"String_Node_Str")) {
      baseUrl=parseBaseUrl(xpp,baseUrl);
    }
 else     if (isStartTag(xpp,"String_Node_Str")) {
      contentProtectionsBuilder.addAdaptationSetProtection(parseContentProtection(xpp));
    }
 else     if (isStartTag(xpp,"String_Node_Str")) {
      id=Integer.parseInt(xpp.getAttributeValue(null,"String_Node_Str"));
      contentType=checkAdaptationSetTypeConsistency(contentType,parseAdaptationSetType(xpp.getAttributeValue(null,"String_Node_Str")));
    }
 else     if (isStartTag(xpp,"String_Node_Str")) {
      Representation representation=parseRepresentation(xpp,baseUrl,periodStartMs,periodDurationMs,mimeType,language,segmentBase,contentProtectionsBuilder);
      contentProtectionsBuilder.endRepresentation();
      contentType=checkAdaptationSetTypeConsistency(contentType,parseAdaptationSetTypeFromMimeType(representation.format.mimeType));
      representations.add(representation);
    }
 else     if (isStartTag(xpp,"String_Node_Str")) {
      segmentBase=parseSegmentBase(xpp,baseUrl,(SingleSegmentBase)segmentBase);
    }
 else     if (isStartTag(xpp,"String_Node_Str")) {
      segmentBase=parseSegmentList(xpp,baseUrl,(SegmentList)segmentBase,periodDurationMs);
    }
 else     if (isStartTag(xpp,"String_Node_Str")) {
      segmentBase=parseSegmentTemplate(xpp,baseUrl,(SegmentTemplate)segmentBase,periodDurationMs);
    }
 else     if (isStartTag(xpp)) {
      parseAdaptationSetChild(xpp);
    }
  }
 while (!isEndTag(xpp,"String_Node_Str"));
  return buildAdaptationSet(id,contentType,representations,contentProtectionsBuilder.build());
}

Fixed version (ground truth):
protected AdaptationSet parseAdaptationSet(XmlPullParser xpp,String baseUrl,long periodStartMs,long periodDurationMs,SegmentBase segmentBase) throws XmlPullParserException, IOException {
  int id=parseInt(xpp,"String_Node_Str",-1);
  String mimeType=xpp.getAttributeValue(null,"String_Node_Str");
  String language=xpp.getAttributeValue(null,"String_Node_Str");
  int contentType=parseAdaptationSetType(xpp.getAttributeValue(null,"String_Node_Str"));
  if (contentType == AdaptationSet.TYPE_UNKNOWN) {
    contentType=parseAdaptationSetTypeFromMimeType(xpp.getAttributeValue(null,"String_Node_Str"));
  }
  ContentProtectionsBuilder contentProtectionsBuilder=new ContentProtectionsBuilder();
  List<Representation> representations=new ArrayList<>();
  do {
    xpp.next();
    if (isStartTag(xpp,"String_Node_Str")) {
      baseUrl=parseBaseUrl(xpp,baseUrl);
    }
 else     if (isStartTag(xpp,"String_Node_Str")) {
      contentProtectionsBuilder.addAdaptationSetProtection(parseContentProtection(xpp));
    }
 else     if (isStartTag(xpp,"String_Node_Str")) {
      language=checkLanguageConsistency(language,xpp.getAttributeValue(null,"String_Node_Str"));
      contentType=checkAdaptationSetTypeConsistency(contentType,parseAdaptationSetType(xpp.getAttributeValue(null,"String_Node_Str")));
    }
 else     if (isStartTag(xpp,"String_Node_Str")) {
      Representation representation=parseRepresentation(xpp,baseUrl,periodStartMs,periodDurationMs,mimeType,language,segmentBase,contentProtectionsBuilder);
      contentProtectionsBuilder.endRepresentation();
      contentType=checkAdaptationSetTypeConsistency(contentType,parseAdaptationSetTypeFromMimeType(representation.format.mimeType));
      representations.add(representation);
    }
 else     if (isStartTag(xpp,"String_Node_Str")) {
      segmentBase=parseSegmentBase(xpp,baseUrl,(SingleSegmentBase)segmentBase);
    }
 else     if (isStartTag(xpp,"String_Node_Str")) {
      segmentBase=parseSegmentList(xpp,baseUrl,(SegmentList)segmentBase,periodDurationMs);
    }
 else     if (isStartTag(xpp,"String_Node_Str")) {
      segmentBase=parseSegmentTemplate(xpp,baseUrl,(SegmentTemplate)segmentBase,periodDurationMs);
    }
 else     if (isStartTag(xpp)) {
      parseAdaptationSetChild(xpp);
    }
  }
 while (!isEndTag(xpp,"String_Node_Str"));
  return buildAdaptationSet(id,contentType,representations,contentProtectionsBuilder.build());
}