Program: 62163
Project: 62163
Buggy source:
public static boolean exportNodeAS(List<TagNode> nodeList,String outdir,boolean isPcode,EventListener ev){
  File dir=new File(outdir);
  if (!outdir.endsWith(File.separator)) {
    outdir=outdir + File.separator;
  }
  List<String> existingNames=new ArrayList<>();
  for (  TagNode node : nodeList) {
    String name="String_Node_Str";
    if (node.tag instanceof Tag) {
      name=((Tag)node.tag).getExportFileName();
    }
 else {
      name=node.tag.toString();
    }
    int i=1;
    String baseName=name;
    while (existingNames.contains(name)) {
      i++;
      name=baseName + "String_Node_Str" + i;
    }
    existingNames.add(name);
    if (node.subItems.isEmpty()) {
      if ((node.tag instanceof ASMSource) && (node.export)) {
        if (!dir.exists()) {
          dir.mkdirs();
        }
        try {
          String f=outdir + name + "String_Node_Str";
          if (ev != null) {
            ev.handleEvent("String_Node_Str","String_Node_Str" + f + "String_Node_Str");
          }
          String ret;
          if (isPcode) {
            ret=Highlighting.stripHilights(((ASMSource)node.tag).getASMSource(SWF.DEFAULT_VERSION,false));
          }
 else {
            List<Action> as=((ASMSource)node.tag).getActions(SWF.DEFAULT_VERSION);
            Action.setActionsAddresses(as,0,SWF.DEFAULT_VERSION);
            ret=(Highlighting.stripHilights(Action.actionsToSource(as,SWF.DEFAULT_VERSION)));
          }
          try (FileOutputStream fos=new FileOutputStream(f)){
            fos.write(ret.getBytes());
          }
         }
 catch (        Exception ex) {
        }
      }
    }
 else {
      exportNodeAS(node.subItems,outdir + name,isPcode,ev);
    }
  }
  return true;
}

Fixed version (ground truth):
public static boolean exportNodeAS(List<TagNode> nodeList,String outdir,boolean isPcode,EventListener ev){
  File dir=new File(outdir);
  if (!outdir.endsWith(File.separator)) {
    outdir=outdir + File.separator;
  }
  List<String> existingNames=new ArrayList<>();
  for (  TagNode node : nodeList) {
    String name="String_Node_Str";
    if (node.tag instanceof Tag) {
      name=((Tag)node.tag).getExportFileName();
    }
 else {
      name=node.tag.toString();
    }
    int i=1;
    String baseName=name;
    while (existingNames.contains(name)) {
      i++;
      name=baseName + "String_Node_Str" + i;
    }
    existingNames.add(name);
    if (node.subItems.isEmpty()) {
      if ((node.tag instanceof ASMSource) && (node.export)) {
        if (!dir.exists()) {
          dir.mkdirs();
        }
        try {
          String f=outdir + name + "String_Node_Str";
          if (ev != null) {
            ev.handleEvent("String_Node_Str","String_Node_Str" + f + "String_Node_Str");
          }
          String ret;
          if (isPcode) {
            ret=Highlighting.stripHilights(((ASMSource)node.tag).getASMSource(SWF.DEFAULT_VERSION,false));
          }
 else {
            List<Action> as=((ASMSource)node.tag).getActions(SWF.DEFAULT_VERSION);
            Action.setActionsAddresses(as,0,SWF.DEFAULT_VERSION);
            ret=(Highlighting.stripHilights(Action.actionsToSource(as,SWF.DEFAULT_VERSION)));
          }
          try (FileOutputStream fos=new FileOutputStream(f)){
            fos.write(ret.getBytes("String_Node_Str"));
          }
         }
 catch (        Exception ex) {
        }
      }
    }
 else {
      exportNodeAS(node.subItems,outdir + name,isPcode,ev);
    }
  }
  return true;
}