Program: 61902
Project: 61902
Buggy source:
public List<File> exportSelection(AbortRetryIgnoreHandler handler,String selFile,ExportDialog export) throws IOException {
  final ExportMode exportMode=ExportMode.get(export.getOption(ExportDialog.OPTION_ACTIONSCRIPT));
  final boolean isMp3OrWav=export.getOption(ExportDialog.OPTION_SOUNDS) == 0;
  final boolean isFormatted=export.getOption(ExportDialog.OPTION_TEXTS) == 1;
  List<File> ret=new ArrayList<>();
  List<TreeNode> sel=getAllSelected(tagTree);
  for (  SWF swf : swfs) {
    List<ScriptPack> tlsList=new ArrayList<>();
    List<Tag> images=new ArrayList<>();
    List<Tag> shapes=new ArrayList<>();
    List<Tag> movies=new ArrayList<>();
    List<Tag> sounds=new ArrayList<>();
    List<Tag> texts=new ArrayList<>();
    List<TreeNode> actionNodes=new ArrayList<>();
    List<Tag> binaryData=new ArrayList<>();
    for (    TreeNode d : sel) {
      if (d.getItem().getSwf() != swf) {
        continue;
      }
      if (d instanceof TagNode) {
        TagNode n=(TagNode)d;
        if (TagTree.getTreeNodeType(n.getItem()) == TreeNodeType.IMAGE) {
          images.add((Tag)n.getItem());
        }
        if (TagTree.getTreeNodeType(n.getItem()) == TreeNodeType.SHAPE) {
          shapes.add((Tag)n.getItem());
        }
        if (TagTree.getTreeNodeType(n.getItem()) == TreeNodeType.AS) {
          actionNodes.add(n);
        }
        if (TagTree.getTreeNodeType(n.getItem()) == TreeNodeType.MOVIE) {
          movies.add((Tag)n.getItem());
        }
        if (TagTree.getTreeNodeType(n.getItem()) == TreeNodeType.SOUND) {
          sounds.add((Tag)n.getItem());
        }
        if (TagTree.getTreeNodeType(n.getItem()) == TreeNodeType.BINARY_DATA) {
          binaryData.add((Tag)n.getItem());
        }
        if (TagTree.getTreeNodeType(n.getItem()) == TreeNodeType.TEXT) {
          texts.add((Tag)n.getItem());
        }
      }
      if (d instanceof TreeElement) {
        if (((TreeElement)d).isLeaf()) {
          TreeElement treeElement=(TreeElement)d;
          tlsList.add((ScriptPack)treeElement.getItem());
        }
      }
    }
    ret.addAll(swf.exportImages(handler,selFile + File.separator + "String_Node_Str",images));
    ret.addAll(SWF.exportShapes(handler,selFile + File.separator + "String_Node_Str",shapes));
    ret.addAll(swf.exportTexts(handler,selFile + File.separator + "String_Node_Str",texts,isFormatted));
    ret.addAll(swf.exportMovies(handler,selFile + File.separator + "String_Node_Str",movies));
    ret.addAll(swf.exportSounds(handler,selFile + File.separator + "String_Node_Str",sounds,isMp3OrWav,isMp3OrWav));
    ret.addAll(SWF.exportBinaryData(handler,selFile + File.separator + "String_Node_Str",binaryData));
    List<ABCContainerTag> abcList=swf.abcList;
    if (abcPanel != null) {
      for (int i=0; i < tlsList.size(); i++) {
        ScriptPack tls=tlsList.get(i);
        Main.startWork(translate("String_Node_Str") + "String_Node_Str" + (i + 1)+ "String_Node_Str"+ tlsList.size()+ "String_Node_Str"+ tls.getPath()+ "String_Node_Str");
        ret.add(tls.export(selFile,abcList,exportMode,Configuration.parallelSpeedUp.get()));
      }
    }
 else {
      List<TreeNode> allNodes=new ArrayList<>();
      List<TreeNode> asNodes=getASTagNode(tagTree);
      for (      TreeNode asn : asNodes) {
        allNodes.add(asn);
        TagNode.setExport(allNodes,false);
        TagNode.setExport(actionNodes,true);
        ret.addAll(TagNode.exportNodeAS(handler,allNodes,selFile,exportMode,null));
      }
    }
  }
  return ret;
}

Fixed version (ground truth):
public List<File> exportSelection(AbortRetryIgnoreHandler handler,String selFile,ExportDialog export) throws IOException {
  final ExportMode exportMode=ExportMode.get(export.getOption(ExportDialog.OPTION_ACTIONSCRIPT));
  final boolean isMp3OrWav=export.getOption(ExportDialog.OPTION_SOUNDS) == 0;
  final boolean isFormatted=export.getOption(ExportDialog.OPTION_TEXTS) == 1;
  List<File> ret=new ArrayList<>();
  List<TreeNode> sel=getAllSelected(tagTree);
  for (  SWF swf : swfs) {
    List<ScriptPack> tlsList=new ArrayList<>();
    List<Tag> images=new ArrayList<>();
    List<Tag> shapes=new ArrayList<>();
    List<Tag> movies=new ArrayList<>();
    List<Tag> sounds=new ArrayList<>();
    List<Tag> texts=new ArrayList<>();
    List<TreeNode> actionNodes=new ArrayList<>();
    List<Tag> binaryData=new ArrayList<>();
    for (    TreeNode d : sel) {
      if (d.getItem().getSwf() != swf) {
        continue;
      }
      if (d instanceof ContainerNode) {
        ContainerNode n=(ContainerNode)d;
        if (TagTree.getTreeNodeType(n.getItem()) == TreeNodeType.IMAGE) {
          images.add((Tag)n.getItem());
        }
        if (TagTree.getTreeNodeType(n.getItem()) == TreeNodeType.SHAPE) {
          shapes.add((Tag)n.getItem());
        }
        if (TagTree.getTreeNodeType(n.getItem()) == TreeNodeType.AS) {
          actionNodes.add(n);
        }
        if (TagTree.getTreeNodeType(n.getItem()) == TreeNodeType.MOVIE) {
          movies.add((Tag)n.getItem());
        }
        if (TagTree.getTreeNodeType(n.getItem()) == TreeNodeType.SOUND) {
          sounds.add((Tag)n.getItem());
        }
        if (TagTree.getTreeNodeType(n.getItem()) == TreeNodeType.BINARY_DATA) {
          binaryData.add((Tag)n.getItem());
        }
        if (TagTree.getTreeNodeType(n.getItem()) == TreeNodeType.TEXT) {
          texts.add((Tag)n.getItem());
        }
      }
      if (d instanceof TreeElement) {
        if (((TreeElement)d).isLeaf()) {
          TreeElement treeElement=(TreeElement)d;
          tlsList.add((ScriptPack)treeElement.getItem());
        }
      }
    }
    ret.addAll(swf.exportImages(handler,selFile + File.separator + "String_Node_Str",images));
    ret.addAll(SWF.exportShapes(handler,selFile + File.separator + "String_Node_Str",shapes));
    ret.addAll(swf.exportTexts(handler,selFile + File.separator + "String_Node_Str",texts,isFormatted));
    ret.addAll(swf.exportMovies(handler,selFile + File.separator + "String_Node_Str",movies));
    ret.addAll(swf.exportSounds(handler,selFile + File.separator + "String_Node_Str",sounds,isMp3OrWav,isMp3OrWav));
    ret.addAll(SWF.exportBinaryData(handler,selFile + File.separator + "String_Node_Str",binaryData));
    List<ABCContainerTag> abcList=swf.abcList;
    if (abcPanel != null) {
      for (int i=0; i < tlsList.size(); i++) {
        ScriptPack tls=tlsList.get(i);
        Main.startWork(translate("String_Node_Str") + "String_Node_Str" + (i + 1)+ "String_Node_Str"+ tlsList.size()+ "String_Node_Str"+ tls.getPath()+ "String_Node_Str");
        ret.add(tls.export(selFile,abcList,exportMode,Configuration.parallelSpeedUp.get()));
      }
    }
 else {
      List<TreeNode> allNodes=new ArrayList<>();
      List<TreeNode> asNodes=getASTagNode(tagTree);
      for (      TreeNode asn : asNodes) {
        allNodes.add(asn);
        TagNode.setExport(allNodes,false);
        TagNode.setExport(actionNodes,true);
        ret.addAll(TagNode.exportNodeAS(handler,allNodes,selFile,exportMode,null));
      }
    }
  }
  return ret;
}