Program: 110375
Project: 110375
Buggy source:
/** 
 * Parses a region declaration. Supports origin and extent definition but only when defined in terms of percentage of the viewport. Regions that do not correctly declare origin are ignored.
 */
private Pair<String,TtmlRegion> parseRegionAttributes(XmlPullParser xmlParser){
  String regionId=ParserUtil.getAttributeValue(xmlParser,TtmlNode.ATTR_ID);
  String regionOrigin=ParserUtil.getAttributeValue(xmlParser,TtmlNode.ATTR_TTS_ORIGIN);
  String regionExtent=ParserUtil.getAttributeValue(xmlParser,TtmlNode.ATTR_TTS_EXTENT);
  if (regionOrigin == null || regionId == null) {
    return null;
  }
  float position=Cue.DIMEN_UNSET;
  float line=Cue.DIMEN_UNSET;
  Matcher originMatcher=PERCENTAGE_COORDINATES.matcher(regionOrigin);
  if (originMatcher.matches()) {
    try {
      position=Float.parseFloat(originMatcher.group(1)) / 100.f;
      line=Float.parseFloat(originMatcher.group(2)) / 100.f;
    }
 catch (    NumberFormatException e) {
      Log.w(TAG,"String_Node_Str" + regionOrigin + "String_Node_Str",e);
      position=Cue.DIMEN_UNSET;
    }
  }
  float width=Cue.DIMEN_UNSET;
  if (regionExtent != null) {
    Matcher extentMatcher=PERCENTAGE_COORDINATES.matcher(regionExtent);
    if (extentMatcher.matches()) {
      try {
        width=Float.parseFloat(extentMatcher.group(1)) / 100.f;
      }
 catch (      NumberFormatException e) {
        Log.w(TAG,"String_Node_Str" + regionExtent + "String_Node_Str",e);
      }
    }
  }
  return position != Cue.DIMEN_UNSET ? new Pair<>(regionId,new TtmlRegion(position,line,width)) : null;
}

Fixed version (ground truth):
/** 
 * Parses a region declaration. Supports origin and extent definition but only when defined in terms of percentage of the viewport. Regions that do not correctly declare origin are ignored.
 */
private Pair<String,TtmlRegion> parseRegionAttributes(XmlPullParser xmlParser){
  String regionId=ParserUtil.getAttributeValue(xmlParser,TtmlNode.ATTR_ID);
  String regionOrigin=ParserUtil.getAttributeValue(xmlParser,TtmlNode.ATTR_TTS_ORIGIN);
  String regionExtent=ParserUtil.getAttributeValue(xmlParser,TtmlNode.ATTR_TTS_EXTENT);
  if (regionOrigin == null || regionId == null) {
    return null;
  }
  float position=Cue.DIMEN_UNSET;
  float line=Cue.DIMEN_UNSET;
  Matcher originMatcher=PERCENTAGE_COORDINATES.matcher(regionOrigin);
  if (originMatcher.matches()) {
    try {
      position=Float.parseFloat(originMatcher.group(1)) / 100.f;
      line=Float.parseFloat(originMatcher.group(2)) / 100.f;
    }
 catch (    NumberFormatException e) {
      Log.w(TAG,"String_Node_Str" + regionOrigin + "String_Node_Str",e);
      position=Cue.DIMEN_UNSET;
    }
  }
  float width=Cue.DIMEN_UNSET;
  if (regionExtent != null) {
    Matcher extentMatcher=PERCENTAGE_COORDINATES.matcher(regionExtent);
    if (extentMatcher.matches()) {
      try {
        width=Float.parseFloat(extentMatcher.group(1)) / 100.f;
      }
 catch (      NumberFormatException e) {
        Log.w(TAG,"String_Node_Str" + regionExtent + "String_Node_Str",e);
      }
    }
  }
  return position != Cue.DIMEN_UNSET ? new Pair<>(regionId,new TtmlRegion(position,line,Cue.LINE_TYPE_FRACTION,width)) : null;
}