Program: 61806
Project: 61806
Buggy source:
public List<DepthState> getObjectsUnderCursor(Point mousePos,int mouseButton,Matrix transformation){
  List<DepthState> ret=new ArrayList<>();
  List<Integer> keys=new ArrayList<>(layers.keySet());
  DepthState maxds=null;
  Stack<Clip> clips=new Stack<>();
  for (  int d : keys) {
    DepthState ds=layers.get(d);
    Clip currentClip=null;
    for (int j=clips.size() - 1; j >= 0; j--) {
      Clip cl=clips.get(j);
      if (cl.depth >= d) {
        clips.remove(j);
      }
    }
    if (!clips.isEmpty()) {
      currentClip=clips.peek();
    }
    CharacterTag c=timeline.swf.characters.get(ds.characterId);
    if (c instanceof DrawableTag) {
      Matrix m=new Matrix(ds.matrix).concatenate(transformation);
      int frame=ds.time % ((DrawableTag)c).getNumFrames();
      if (c instanceof ButtonTag) {
        frame=ButtonTag.FRAME_HITTEST;
      }
      Shape outline=SHAPERECORD.twipToPixelShape(((DrawableTag)c).getOutline(frame,ds.ratio,null,mouseButton,m));
      Area checkArea=new Area(outline);
      if (currentClip != null) {
        Area a=new Area(checkArea.getBounds());
        a.subtract(new Area(currentClip.shape));
        checkArea.subtract(a);
      }
      if (ds.clipDepth > -1) {
        Clip clip=new Clip(checkArea,ds.clipDepth);
        clips.push(clip);
      }
 else       if (checkArea.contains(mousePos)) {
        maxds=ds;
      }
    }
  }
  if (maxds == null) {
    return ret;
  }
  ret.add(maxds);
  CharacterTag c=timeline.swf.characters.get(maxds.characterId);
  if (c instanceof Timelined) {
    Timelined tc=((Timelined)c);
    int frame=maxds.time % ((DrawableTag)c).getNumFrames();
    ;
    if (tc instanceof ButtonTag) {
      frame=ButtonTag.FRAME_HITTEST;
    }
    ret.addAll(tc.getTimeline().frames.get(frame).getObjectsUnderCursor(mousePos,mouseButton,new Matrix(maxds.matrix).preConcatenate(transformation)));
  }
  return ret;
}

Fixed version (ground truth):
public List<DepthState> getObjectsUnderCursor(Point mousePos,int mouseButton,Matrix transformation){
  List<DepthState> ret=new ArrayList<>();
  List<Integer> keys=new ArrayList<>(layers.keySet());
  DepthState maxds=null;
  Stack<Clip> clips=new Stack<>();
  for (  int d : keys) {
    DepthState ds=layers.get(d);
    Clip currentClip=null;
    for (int j=clips.size() - 1; j >= 0; j--) {
      Clip cl=clips.get(j);
      if (cl.depth >= d) {
        clips.remove(j);
      }
    }
    if (!clips.isEmpty()) {
      currentClip=clips.peek();
    }
    CharacterTag c=timeline.swf.characters.get(ds.characterId);
    if (c instanceof DrawableTag) {
      Matrix m=new Matrix(ds.matrix).preConcatenate(transformation);
      int frame=ds.time % ((DrawableTag)c).getNumFrames();
      if (c instanceof ButtonTag) {
        frame=ButtonTag.FRAME_HITTEST;
      }
      Shape outline=SHAPERECORD.twipToPixelShape(((DrawableTag)c).getOutline(frame,ds.ratio,null,mouseButton,m));
      Area checkArea=new Area(outline);
      if (currentClip != null) {
        Area a=new Area(checkArea.getBounds());
        a.subtract(new Area(currentClip.shape));
        checkArea.subtract(a);
      }
      if (ds.clipDepth > -1) {
        Clip clip=new Clip(checkArea,ds.clipDepth);
        clips.push(clip);
      }
 else       if (checkArea.contains(mousePos)) {
        maxds=ds;
      }
    }
  }
  if (maxds == null) {
    return ret;
  }
  ret.add(maxds);
  CharacterTag c=timeline.swf.characters.get(maxds.characterId);
  if (c instanceof Timelined) {
    Timelined tc=((Timelined)c);
    int frame=maxds.time % ((DrawableTag)c).getNumFrames();
    ;
    if (tc instanceof ButtonTag) {
      frame=ButtonTag.FRAME_HITTEST;
    }
    ret.addAll(tc.getTimeline().frames.get(frame).getObjectsUnderCursor(mousePos,mouseButton,new Matrix(maxds.matrix).preConcatenate(transformation)));
  }
  return ret;
}