Program: 62056
Project: 62056
Buggy source:
private static String convertFrames(String prevStr,String afterStr,List<Integer> oneInstanceShapes,List<Tag> tags,List<Tag> timelineTags,HashMap<Integer,CharacterTag> characters,int depth){
  String ret="String_Node_Str";
  prevStr+="String_Node_Str";
  int frame=-1;
  String elements="String_Node_Str";
  String lastElements="String_Node_Str";
  int duration=1;
  String frameName=null;
  boolean isAnchor=false;
  CharacterTag character=null;
  MATRIX matrix=null;
  String instanceName=null;
  CXFORM colorTransForm=null;
  CXFORMWITHALPHA colorTransFormAlpha=null;
  boolean cacheAsBitmap=false;
  int blendMode=0;
  List<FILTER> filters=new ArrayList<>();
  boolean isVisible=true;
  RGBA backGroundColor=null;
  CLIPACTIONS clipActions=null;
  int characterId=-1;
  int ratio=-1;
  boolean shapeTween=false;
  boolean lastShapeTween=false;
  for (  Tag t : timelineTags) {
    if (t instanceof PlaceObjectTypeTag) {
      PlaceObjectTypeTag po=(PlaceObjectTypeTag)t;
      if (po.getDepth() == depth) {
        int newCharId=po.getCharacterId();
        if (newCharId == -1) {
          newCharId=characterId;
        }
        characterId=newCharId;
        if (characters.containsKey(characterId)) {
          character=characters.get(characterId);
          if (po.flagMove()) {
            MATRIX matrix2=po.getMatrix();
            if (matrix2 != null) {
              matrix=matrix2;
            }
            String instanceName2=po.getInstanceName();
            if (instanceName2 != null) {
              instanceName=instanceName2;
            }
            CXFORM colorTransForm2=po.getColorTransform();
            if (colorTransForm2 != null) {
              colorTransForm=colorTransForm2;
            }
            CXFORMWITHALPHA colorTransFormAlpha2=po.getColorTransformWithAlpha();
            if (colorTransFormAlpha2 != null) {
              colorTransFormAlpha=colorTransFormAlpha2;
            }
            CLIPACTIONS clipActions2=po.getClipActions();
            if (clipActions2 != null) {
              clipActions=clipActions2;
            }
            if (po.cacheAsBitmap()) {
              cacheAsBitmap=true;
            }
            int blendMode2=po.getBlendMode();
            if (blendMode2 > 0) {
              blendMode=blendMode2;
            }
            List<FILTER> filters2=po.getFilters();
            if (filters2 != null) {
              filters=filters2;
            }
            int ratio2=po.getRatio();
            if (ratio2 > -1) {
              ratio=ratio2;
            }
          }
 else {
            matrix=po.getMatrix();
            instanceName=po.getInstanceName();
            colorTransForm=po.getColorTransform();
            colorTransFormAlpha=po.getColorTransformWithAlpha();
            cacheAsBitmap=po.cacheAsBitmap();
            blendMode=po.getBlendMode();
            filters=po.getFilters();
            ratio=po.getRatio();
            clipActions=po.getClipActions();
          }
        }
      }
    }
    if (t instanceof RemoveTag) {
      RemoveTag rt=(RemoveTag)t;
      if (rt.getDepth() == depth) {
        character=null;
        matrix=null;
        instanceName=null;
        colorTransForm=null;
        colorTransFormAlpha=null;
        cacheAsBitmap=false;
        blendMode=0;
        filters=new ArrayList<>();
        isVisible=true;
        backGroundColor=null;
        characterId=-1;
        clipActions=null;
      }
    }
    if (t instanceof FrameLabelTag) {
      FrameLabelTag flt=(FrameLabelTag)t;
      frameName=flt.getLabelName();
      isAnchor=flt.isNamedAnchor();
    }
    if (t instanceof ShowFrameTag) {
      elements="String_Node_Str";
      if ((character instanceof ShapeTag) && oneInstanceShapes.contains(characterId)) {
        elements+=convertShape(characters,matrix,(ShapeTag)character);
        shapeTween=false;
      }
 else       if (character != null) {
        if (character instanceof MorphShapeTag) {
          MorphShapeTag m=(MorphShapeTag)character;
          if (ratio == 65535) {
            elements+=convertShape(characters,matrix,3,m.getEndEdges().shapeRecords,m.getFillStyles().getEndFillStyles(),m.getLineStyles().getEndLineStyles(m.getShapeNum()),true);
            shapeTween=false;
          }
 else {
            elements+=convertShape(characters,matrix,3,m.getStartEdges().shapeRecords,m.getFillStyles().getStartFillStyles(),m.getLineStyles().getStartLineStyles(m.getShapeNum()),true);
            shapeTween=true;
          }
        }
 else {
          shapeTween=false;
          if (character instanceof TextTag) {
            elements+=convertText(instanceName,tags,(TextTag)character,matrix,filters,clipActions);
          }
 else           if (character instanceof DefineVideoStreamTag) {
            elements+=convertVideoInstance(instanceName,matrix,(DefineVideoStreamTag)character,clipActions);
          }
 else {
            elements+=convertSymbolInstance(instanceName,matrix,colorTransForm,colorTransFormAlpha,cacheAsBitmap,blendMode,filters,isVisible,backGroundColor,clipActions,character,characters,tags);
          }
        }
      }
      frame++;
      if (!elements.equals(lastElements) && frame > 0) {
        ret+=convertFrame(lastShapeTween,characters,tags,null,null,frame - duration,frameName,isAnchor,duration,"String_Node_Str",lastElements);
        duration=1;
      }
 else       if (frame == 0) {
        duration=1;
      }
 else {
        duration++;
      }
      lastShapeTween=shapeTween;
      lastElements=elements;
      frameName=null;
      isAnchor=false;
    }
  }
  if (!lastElements.equals("String_Node_Str")) {
    ret+=convertFrame(lastShapeTween,characters,tags,null,null,(frame - duration < 0 ? 0 : frame - duration),frameName,isAnchor,duration,"String_Node_Str",lastElements);
  }
  afterStr="String_Node_Str" + afterStr;
  if (!ret.equals("String_Node_Str")) {
    ret=prevStr + ret + afterStr;
  }
  return ret;
}

Fixed version (ground truth):
private static String convertFrames(String prevStr,String afterStr,List<Integer> oneInstanceShapes,List<Tag> tags,List<Tag> timelineTags,HashMap<Integer,CharacterTag> characters,int depth){
  String ret="String_Node_Str";
  prevStr+="String_Node_Str";
  int frame=-1;
  String elements="String_Node_Str";
  String lastElements="String_Node_Str";
  int duration=1;
  CharacterTag character=null;
  MATRIX matrix=null;
  String instanceName=null;
  CXFORM colorTransForm=null;
  CXFORMWITHALPHA colorTransFormAlpha=null;
  boolean cacheAsBitmap=false;
  int blendMode=0;
  List<FILTER> filters=new ArrayList<>();
  boolean isVisible=true;
  RGBA backGroundColor=null;
  CLIPACTIONS clipActions=null;
  int characterId=-1;
  int ratio=-1;
  boolean shapeTween=false;
  boolean lastShapeTween=false;
  for (  Tag t : timelineTags) {
    if (t instanceof PlaceObjectTypeTag) {
      PlaceObjectTypeTag po=(PlaceObjectTypeTag)t;
      if (po.getDepth() == depth) {
        int newCharId=po.getCharacterId();
        if (newCharId == -1) {
          newCharId=characterId;
        }
        characterId=newCharId;
        if (characters.containsKey(characterId)) {
          character=characters.get(characterId);
          if (po.flagMove()) {
            MATRIX matrix2=po.getMatrix();
            if (matrix2 != null) {
              matrix=matrix2;
            }
            String instanceName2=po.getInstanceName();
            if (instanceName2 != null) {
              instanceName=instanceName2;
            }
            CXFORM colorTransForm2=po.getColorTransform();
            if (colorTransForm2 != null) {
              colorTransForm=colorTransForm2;
            }
            CXFORMWITHALPHA colorTransFormAlpha2=po.getColorTransformWithAlpha();
            if (colorTransFormAlpha2 != null) {
              colorTransFormAlpha=colorTransFormAlpha2;
            }
            CLIPACTIONS clipActions2=po.getClipActions();
            if (clipActions2 != null) {
              clipActions=clipActions2;
            }
            if (po.cacheAsBitmap()) {
              cacheAsBitmap=true;
            }
            int blendMode2=po.getBlendMode();
            if (blendMode2 > 0) {
              blendMode=blendMode2;
            }
            List<FILTER> filters2=po.getFilters();
            if (filters2 != null) {
              filters=filters2;
            }
            int ratio2=po.getRatio();
            if (ratio2 > -1) {
              ratio=ratio2;
            }
          }
 else {
            matrix=po.getMatrix();
            instanceName=po.getInstanceName();
            colorTransForm=po.getColorTransform();
            colorTransFormAlpha=po.getColorTransformWithAlpha();
            cacheAsBitmap=po.cacheAsBitmap();
            blendMode=po.getBlendMode();
            filters=po.getFilters();
            ratio=po.getRatio();
            clipActions=po.getClipActions();
          }
        }
      }
    }
    if (t instanceof RemoveTag) {
      RemoveTag rt=(RemoveTag)t;
      if (rt.getDepth() == depth) {
        character=null;
        matrix=null;
        instanceName=null;
        colorTransForm=null;
        colorTransFormAlpha=null;
        cacheAsBitmap=false;
        blendMode=0;
        filters=new ArrayList<>();
        isVisible=true;
        backGroundColor=null;
        characterId=-1;
        clipActions=null;
      }
    }
    if (t instanceof ShowFrameTag) {
      elements="String_Node_Str";
      if ((character instanceof ShapeTag) && oneInstanceShapes.contains(characterId)) {
        elements+=convertShape(characters,matrix,(ShapeTag)character);
        shapeTween=false;
      }
 else       if (character != null) {
        if (character instanceof MorphShapeTag) {
          MorphShapeTag m=(MorphShapeTag)character;
          if (ratio == 65535) {
            elements+=convertShape(characters,matrix,3,m.getEndEdges().shapeRecords,m.getFillStyles().getEndFillStyles(),m.getLineStyles().getEndLineStyles(m.getShapeNum()),true);
            shapeTween=false;
          }
 else {
            elements+=convertShape(characters,matrix,3,m.getStartEdges().shapeRecords,m.getFillStyles().getStartFillStyles(),m.getLineStyles().getStartLineStyles(m.getShapeNum()),true);
            shapeTween=true;
          }
        }
 else {
          shapeTween=false;
          if (character instanceof TextTag) {
            elements+=convertText(instanceName,tags,(TextTag)character,matrix,filters,clipActions);
          }
 else           if (character instanceof DefineVideoStreamTag) {
            elements+=convertVideoInstance(instanceName,matrix,(DefineVideoStreamTag)character,clipActions);
          }
 else {
            elements+=convertSymbolInstance(instanceName,matrix,colorTransForm,colorTransFormAlpha,cacheAsBitmap,blendMode,filters,isVisible,backGroundColor,clipActions,character,characters,tags);
          }
        }
      }
      frame++;
      if (!elements.equals(lastElements) && frame > 0) {
        ret+=convertFrame(lastShapeTween,characters,tags,null,null,frame - duration,duration,"String_Node_Str",lastElements);
        duration=1;
      }
 else       if (frame == 0) {
        duration=1;
      }
 else {
        duration++;
      }
      lastShapeTween=shapeTween;
      lastElements=elements;
    }
  }
  if (!lastElements.equals("String_Node_Str")) {
    frame++;
    ret+=convertFrame(lastShapeTween,characters,tags,null,null,(frame - duration < 0 ? 0 : frame - duration),duration,"String_Node_Str",lastElements);
  }
  afterStr="String_Node_Str" + afterStr;
  if (!ret.equals("String_Node_Str")) {
    ret=prevStr + ret + afterStr;
  }
  return ret;
}