Program: 44600
Project: 44600
Buggy source:
private static MediaModel getGenericMediaModel(Context context,String tag,String src,SMILMediaElement sme,PduPart part,RegionModel regionModel) throws DrmException, IOException, MmsException {
  byte[] bytes=part.getContentType();
  if (bytes == null) {
    throw new IllegalArgumentException("String_Node_Str");
  }
  String contentType=new String(bytes);
  MediaModel media=null;
  if (ContentType.isDrmType(contentType)) {
    DrmWrapper wrapper=new DrmWrapper(contentType,part.getDataUri(),part.getData());
    if (tag.equals(SmilHelper.ELEMENT_TAG_TEXT)) {
      media=new TextModel(context,contentType,src,part.getCharset(),wrapper,regionModel);
    }
 else     if (tag.equals(SmilHelper.ELEMENT_TAG_IMAGE)) {
      media=new ImageModel(context,contentType,src,wrapper,regionModel);
    }
 else     if (tag.equals(SmilHelper.ELEMENT_TAG_VIDEO)) {
      media=new VideoModel(context,contentType,src,wrapper,regionModel);
    }
 else     if (tag.equals(SmilHelper.ELEMENT_TAG_AUDIO)) {
      media=new AudioModel(context,contentType,src,wrapper);
    }
 else     if (tag.equals(SmilHelper.ELEMENT_TAG_REF)) {
      String drmContentType=wrapper.getContentType();
      if (ContentType.isTextType(drmContentType)) {
        media=new TextModel(context,contentType,src,part.getCharset(),wrapper,regionModel);
      }
 else       if (ContentType.isImageType(drmContentType)) {
        media=new ImageModel(context,contentType,src,wrapper,regionModel);
      }
 else       if (ContentType.isVideoType(drmContentType)) {
        media=new VideoModel(context,contentType,src,wrapper,regionModel);
      }
 else       if (ContentType.isAudioType(drmContentType)) {
        media=new AudioModel(context,contentType,src,wrapper);
      }
 else {
        throw new UnsupportContentTypeException("String_Node_Str" + drmContentType);
      }
    }
 else {
      throw new IllegalArgumentException("String_Node_Str" + tag);
    }
  }
 else {
    if (tag.equals(SmilHelper.ELEMENT_TAG_TEXT)) {
      media=new TextModel(context,contentType,src,part.getCharset(),part.getData(),regionModel);
    }
 else     if (tag.equals(SmilHelper.ELEMENT_TAG_IMAGE)) {
      media=new ImageModel(context,contentType,src,part.getDataUri(),regionModel);
    }
 else     if (tag.equals(SmilHelper.ELEMENT_TAG_VIDEO)) {
      media=new VideoModel(context,contentType,src,part.getDataUri(),regionModel);
    }
 else     if (tag.equals(SmilHelper.ELEMENT_TAG_AUDIO)) {
      media=new AudioModel(context,contentType,src,part.getDataUri());
    }
 else     if (tag.equals(SmilHelper.ELEMENT_TAG_REF)) {
      if (ContentType.isTextType(contentType)) {
        media=new TextModel(context,contentType,src,part.getCharset(),part.getData(),regionModel);
      }
 else       if (ContentType.isImageType(contentType)) {
        media=new ImageModel(context,contentType,src,part.getDataUri(),regionModel);
      }
 else       if (ContentType.isVideoType(contentType)) {
        media=new VideoModel(context,contentType,src,part.getDataUri(),regionModel);
      }
 else       if (ContentType.isAudioType(contentType)) {
        media=new AudioModel(context,contentType,src,part.getDataUri());
      }
 else {
        throw new UnsupportContentTypeException("String_Node_Str" + contentType);
      }
    }
 else {
      throw new IllegalArgumentException("String_Node_Str" + tag);
    }
  }
  int begin=0;
  TimeList tl=sme.getBegin();
  if ((tl != null) && (tl.getLength() > 0)) {
    Time t=tl.item(0);
    begin=(int)(t.getResolvedOffset() * 1000);
  }
  media.setBegin(begin);
  int duration=(int)(sme.getDur() * 1000);
  if (duration <= 0) {
    tl=sme.getEnd();
    if ((tl != null) && (tl.getLength() > 0)) {
      Time t=tl.item(0);
      if (t.getTimeType() != Time.SMIL_TIME_INDEFINITE) {
        duration=(int)(t.getResolvedOffset() * 1000) - begin;
      }
    }
  }
  media.setDuration(duration);
  media.setFill(sme.getFill());
  return media;
}

Fixed version (ground truth):
private static MediaModel getGenericMediaModel(Context context,String tag,String src,SMILMediaElement sme,PduPart part,RegionModel regionModel) throws DrmException, IOException, MmsException {
  byte[] bytes=part.getContentType();
  if (bytes == null) {
    throw new IllegalArgumentException("String_Node_Str");
  }
  String contentType=new String(bytes);
  MediaModel media=null;
  if (ContentType.isDrmType(contentType)) {
    DrmWrapper wrapper=new DrmWrapper(contentType,part.getDataUri(),part.getData());
    if (tag.equals(SmilHelper.ELEMENT_TAG_TEXT)) {
      media=new TextModel(context,contentType,src,part.getCharset(),wrapper,regionModel);
    }
 else     if (tag.equals(SmilHelper.ELEMENT_TAG_IMAGE)) {
      media=new ImageModel(context,contentType,src,wrapper,regionModel);
    }
 else     if (tag.equals(SmilHelper.ELEMENT_TAG_VIDEO)) {
      media=new VideoModel(context,contentType,src,wrapper,regionModel);
    }
 else     if (tag.equals(SmilHelper.ELEMENT_TAG_AUDIO)) {
      media=new AudioModel(context,contentType,src,wrapper);
    }
 else     if (tag.equals(SmilHelper.ELEMENT_TAG_REF)) {
      String drmContentType=wrapper.getContentType();
      if (ContentType.isTextType(drmContentType)) {
        media=new TextModel(context,contentType,src,part.getCharset(),wrapper,regionModel);
      }
 else       if (ContentType.isImageType(drmContentType)) {
        media=new ImageModel(context,contentType,src,wrapper,regionModel);
      }
 else       if (ContentType.isVideoType(drmContentType)) {
        media=new VideoModel(context,contentType,src,wrapper,regionModel);
      }
 else       if (ContentType.isAudioType(drmContentType)) {
        media=new AudioModel(context,contentType,src,wrapper);
      }
 else {
        throw new UnsupportContentTypeException("String_Node_Str" + drmContentType);
      }
    }
 else {
      throw new IllegalArgumentException("String_Node_Str" + tag);
    }
  }
 else {
    if (tag.equals(SmilHelper.ELEMENT_TAG_TEXT)) {
      media=new TextModel(context,contentType,src,part.getCharset(),part.getData(),regionModel);
    }
 else     if (tag.equals(SmilHelper.ELEMENT_TAG_IMAGE)) {
      media=new ImageModel(context,contentType,src,part.getDataUri(),regionModel);
    }
 else     if (tag.equals(SmilHelper.ELEMENT_TAG_VIDEO)) {
      media=new VideoModel(context,contentType,src,part.getDataUri(),regionModel);
    }
 else     if (tag.equals(SmilHelper.ELEMENT_TAG_AUDIO)) {
      media=new AudioModel(context,contentType,src,part.getDataUri());
    }
 else     if (tag.equals(SmilHelper.ELEMENT_TAG_REF)) {
      if (ContentType.isTextType(contentType)) {
        media=new TextModel(context,contentType,src,part.getCharset(),part.getData(),regionModel);
      }
 else       if (ContentType.isImageType(contentType)) {
        media=new ImageModel(context,contentType,src,part.getDataUri(),regionModel);
      }
 else       if (ContentType.isVideoType(contentType)) {
        media=new VideoModel(context,contentType,src,part.getDataUri(),regionModel);
      }
 else       if (ContentType.isAudioType(contentType)) {
        media=new AudioModel(context,contentType,src,part.getDataUri());
      }
 else {
        throw new UnsupportContentTypeException("String_Node_Str" + contentType);
      }
    }
 else {
      throw new IllegalArgumentException("String_Node_Str" + tag);
    }
  }
  int begin=0;
  TimeList tl=sme.getBegin();
  if ((tl != null) && (tl.getLength() > 0)) {
    Time t=tl.item(0);
    begin=(int)(t.getResolvedOffset() * 1000);
  }
  media.setBegin(begin);
  int duration=(int)(sme.getDur() * 1000);
  if (duration <= 0) {
    tl=sme.getEnd();
    if ((tl != null) && (tl.getLength() > 0)) {
      Time t=tl.item(0);
      if (t.getTimeType() != Time.SMIL_TIME_INDEFINITE) {
        duration=(int)(t.getResolvedOffset() * 1000) - begin;
        if (duration == 0 && (media instanceof AudioModel || media instanceof VideoModel)) {
          duration=MmsConfig.getMinimumSlideElementDuration();
          if (Log.isLoggable(LogTag.APP,Log.VERBOSE)) {
            Log.d(TAG,"String_Node_Str" + tag + "String_Node_Str"+ duration);
          }
        }
      }
    }
  }
  media.setDuration(duration);
  media.setFill(sme.getFill());
  return media;
}