Program: 61590
Project: 61590
Buggy source:
public void reload(boolean forceReload){
  closeTag();
  if (Configuration.dumpView.get()) {
    dumpViewReload(forceReload);
    return;
  }
  TreeItem treeItem=(TreeItem)tagTree.getLastSelectedPathComponent();
  if (treeItem == null) {
    return;
  }
  if (!forceReload && (treeItem == oldItem)) {
    return;
  }
  oldItem=treeItem;
  boolean preferScript=false;
  if (treeItem instanceof TagScript) {
    treeItem=((TagScript)treeItem).getTag();
    preferScript=true;
  }
  folderPreviewPanel.setItems(new ArrayList<TreeItem>());
  previewPanel.clear();
  stopFlashPlayer();
  if (treeItem instanceof ScriptPack) {
    final ScriptPack scriptLeaf=(ScriptPack)treeItem;
    if (setSourceWorker != null) {
      setSourceWorker.cancel(true);
      setSourceWorker=null;
    }
    if (!Main.isWorking()) {
      Main.startWork(AppStrings.translate("String_Node_Str") + "String_Node_Str");
      CancellableWorker worker=new CancellableWorker(){
        @Override protected Void doInBackground() throws Exception {
          getABCPanel().detailPanel.methodTraitPanel.methodCodePanel.clear();
          getABCPanel().navigator.setAbc(scriptLeaf.abc);
          getABCPanel().setAbc(scriptLeaf.abc);
          getABCPanel().decompiledTextArea.setScript(scriptLeaf);
          getABCPanel().decompiledTextArea.setNoTrait();
          return null;
        }
        @Override protected void done(){
          Main.stopWork();
          View.execInEventDispatch(new Runnable(){
            @Override public void run(){
              setSourceWorker=null;
              try {
                get();
              }
 catch (              CancellationException ex) {
                getABCPanel().decompiledTextArea.setText("String_Node_Str" + AppStrings.translate("String_Node_Str"));
              }
catch (              Exception ex) {
                getABCPanel().decompiledTextArea.setText("String_Node_Str" + AppStrings.translate("String_Node_Str") + "String_Node_Str"+ ex);
              }
            }
          }
);
        }
      }
;
      worker.execute();
      setSourceWorker=worker;
      Main.startWork(translate("String_Node_Str") + "String_Node_Str",worker);
    }
    showDetail(DETAILCARDAS3NAVIGATOR);
    showCard(CARDACTIONSCRIPT3PANEL);
    return;
  }
 else {
    showDetail(DETAILCARDEMPTYPANEL);
  }
  previewPanel.setImageReplaceButtonVisible(false);
  boolean internalViewer=isInternalFlashViewerSelected();
  if (treeItem instanceof HeaderItem) {
    showCard(CARDHEADER);
    headerPanel.load(((HeaderItem)treeItem).getSwf());
  }
 else   if (treeItem instanceof FolderItem) {
    showCard(CARDFOLDERPREVIEWPANEL);
    showFolderPreview(treeItem);
  }
 else   if (treeItem instanceof SWF) {
    SWF swf=(SWF)treeItem;
    showCard(CARDPREVIEWPANEL);
    if (internalViewer) {
      previewPanel.showImagePanel(swf,swf,-1);
    }
 else {
      previewPanel.setParametersPanelVisible(false);
      if (flashPanel != null) {
        previewPanel.showFlashViewerPanel();
        previewPanel.showSwf(swf);
      }
    }
  }
 else   if (treeItem instanceof DefineBinaryDataTag) {
    DefineBinaryDataTag binaryTag=(DefineBinaryDataTag)treeItem;
    showCard(CARDPREVIEWPANEL);
    previewPanel.showBinaryPanel(binaryTag);
  }
 else   if (treeItem instanceof ASMSource && (!(treeItem instanceof DrawableTag) || preferScript)) {
    ensureActionPanel();
    showCard(CARDACTIONSCRIPTPANEL);
    getActionPanel().setSource((ASMSource)treeItem,!forceReload);
  }
 else   if (treeItem instanceof ImageTag) {
    ImageTag imageTag=(ImageTag)treeItem;
    previewPanel.setImageReplaceButtonVisible(imageTag.importSupported());
    showCard(CARDPREVIEWPANEL);
    previewPanel.showImagePanel(imageTag.getImage());
  }
 else   if ((treeItem instanceof DrawableTag) && (!(treeItem instanceof TextTag)) && (!(treeItem instanceof FontTag))&& internalViewer) {
    final Tag tag=(Tag)treeItem;
    showCard(CARDPREVIEWPANEL);
    DrawableTag d=(DrawableTag)tag;
    Timelined timelined;
    if (treeItem instanceof Timelined && !(treeItem instanceof ButtonTag)) {
      timelined=(Timelined)tag;
    }
 else {
      timelined=makeTimelined(tag);
    }
    previewPanel.setParametersPanelVisible(false);
    previewPanel.showImagePanel(timelined,tag.getSwf(),-1);
  }
 else   if ((treeItem instanceof FontTag) && internalViewer) {
    FontTag fontTag=(FontTag)treeItem;
    showCard(CARDPREVIEWPANEL);
    showFontTag(fontTag);
  }
 else   if ((treeItem instanceof TextTag) && internalViewer) {
    TextTag textTag=(TextTag)treeItem;
    showCard(CARDPREVIEWPANEL);
    showTextTag(textTag);
  }
 else   if (treeItem instanceof Frame && internalViewer) {
    showCard(CARDPREVIEWPANEL);
    Frame fn=(Frame)treeItem;
    SWF swf=fn.getSwf();
    List<Tag> controlTags=swf.tags;
    int containerId=0;
    RECT rect=swf.displayRect;
    int totalFrameCount=swf.frameCount;
    Timelined timelined=swf;
    if (fn.timeline.timelined instanceof DefineSpriteTag) {
      DefineSpriteTag parentSprite=(DefineSpriteTag)fn.timeline.timelined;
      controlTags=parentSprite.subTags;
      containerId=parentSprite.spriteId;
      rect=parentSprite.getRect();
      totalFrameCount=parentSprite.frameCount;
      timelined=parentSprite;
    }
    previewPanel.showImagePanel(timelined,swf,fn.frame);
  }
 else   if ((treeItem instanceof SoundTag)) {
    showCard(CARDPREVIEWPANEL);
    previewPanel.showImagePanel(new SerializableImage(View.loadImage("String_Node_Str")));
    previewPanel.setImageReplaceButtonVisible(treeItem instanceof DefineSoundTag);
    try {
      SoundTagPlayer soundThread=new SoundTagPlayer((SoundTag)treeItem,Integer.MAX_VALUE,true);
      previewPanel.setMedia(soundThread);
    }
 catch (    LineUnavailableException|IOException|UnsupportedAudioFileException ex) {
      logger.log(Level.SEVERE,null,ex);
    }
  }
 else   if ((treeItem instanceof Frame) || ((treeItem instanceof CharacterTag) || (treeItem instanceof FontTag)) && (treeItem instanceof Tag) || (treeItem instanceof SoundStreamHeadTypeTag)) {
    showCard(CARDPREVIEWPANEL);
    previewPanel.createAndShowTempSwf(treeItem);
    if (treeItem instanceof TextTag) {
      showTextTag((TextTag)treeItem);
    }
 else     if (treeItem instanceof FontTag) {
      showFontTag((FontTag)treeItem);
    }
 else {
      previewPanel.setParametersPanelVisible(false);
    }
  }
 else   if (treeItem instanceof Tag) {
    showGenericTag((Tag)treeItem);
  }
 else {
    showCard(CARDEMPTYPANEL);
  }
}

Fixed version (ground truth):
public void reload(boolean forceReload){
  if (Configuration.dumpView.get()) {
    dumpViewReload(forceReload);
    return;
  }
  TreeItem treeItem=(TreeItem)tagTree.getLastSelectedPathComponent();
  if (treeItem == null) {
    return;
  }
  if (!forceReload && (treeItem == oldItem)) {
    return;
  }
  if (oldItem != treeItem) {
    closeTag();
  }
  oldItem=treeItem;
  boolean preferScript=false;
  if (treeItem instanceof TagScript) {
    treeItem=((TagScript)treeItem).getTag();
    preferScript=true;
  }
  folderPreviewPanel.setItems(new ArrayList<>());
  previewPanel.clear();
  stopFlashPlayer();
  if (treeItem instanceof ScriptPack) {
    final ScriptPack scriptLeaf=(ScriptPack)treeItem;
    if (setSourceWorker != null) {
      setSourceWorker.cancel(true);
      setSourceWorker=null;
    }
    if (!Main.isWorking()) {
      Main.startWork(AppStrings.translate("String_Node_Str") + "String_Node_Str");
      CancellableWorker worker=new CancellableWorker(){
        @Override protected Void doInBackground() throws Exception {
          getABCPanel().detailPanel.methodTraitPanel.methodCodePanel.clear();
          getABCPanel().navigator.setAbc(scriptLeaf.abc);
          getABCPanel().setAbc(scriptLeaf.abc);
          getABCPanel().decompiledTextArea.setScript(scriptLeaf);
          getABCPanel().decompiledTextArea.setNoTrait();
          return null;
        }
        @Override protected void done(){
          Main.stopWork();
          View.execInEventDispatch(new Runnable(){
            @Override public void run(){
              setSourceWorker=null;
              try {
                get();
              }
 catch (              CancellationException ex) {
                getABCPanel().decompiledTextArea.setText("String_Node_Str" + AppStrings.translate("String_Node_Str"));
              }
catch (              Exception ex) {
                getABCPanel().decompiledTextArea.setText("String_Node_Str" + AppStrings.translate("String_Node_Str") + "String_Node_Str"+ ex);
              }
            }
          }
);
        }
      }
;
      worker.execute();
      setSourceWorker=worker;
      Main.startWork(translate("String_Node_Str") + "String_Node_Str",worker);
    }
    showDetail(DETAILCARDAS3NAVIGATOR);
    showCard(CARDACTIONSCRIPT3PANEL);
    return;
  }
 else {
    showDetail(DETAILCARDEMPTYPANEL);
  }
  previewPanel.setImageReplaceButtonVisible(false);
  boolean internalViewer=isInternalFlashViewerSelected();
  if (treeItem instanceof HeaderItem) {
    showCard(CARDHEADER);
    headerPanel.load(((HeaderItem)treeItem).getSwf());
  }
 else   if (treeItem instanceof FolderItem) {
    showCard(CARDFOLDERPREVIEWPANEL);
    showFolderPreview(treeItem);
  }
 else   if (treeItem instanceof SWF) {
    SWF swf=(SWF)treeItem;
    showCard(CARDPREVIEWPANEL);
    if (internalViewer) {
      previewPanel.showImagePanel(swf,swf,-1);
    }
 else {
      previewPanel.setParametersPanelVisible(false);
      if (flashPanel != null) {
        previewPanel.showFlashViewerPanel();
        previewPanel.showSwf(swf);
      }
    }
  }
 else   if (treeItem instanceof DefineBinaryDataTag) {
    DefineBinaryDataTag binaryTag=(DefineBinaryDataTag)treeItem;
    showCard(CARDPREVIEWPANEL);
    previewPanel.showBinaryPanel(binaryTag);
  }
 else   if (treeItem instanceof ASMSource && (!(treeItem instanceof DrawableTag) || preferScript)) {
    ensureActionPanel();
    showCard(CARDACTIONSCRIPTPANEL);
    getActionPanel().setSource((ASMSource)treeItem,!forceReload);
  }
 else   if (treeItem instanceof ImageTag) {
    ImageTag imageTag=(ImageTag)treeItem;
    previewPanel.setImageReplaceButtonVisible(imageTag.importSupported());
    showCard(CARDPREVIEWPANEL);
    previewPanel.showImagePanel(imageTag.getImage());
  }
 else   if ((treeItem instanceof DrawableTag) && (!(treeItem instanceof TextTag)) && (!(treeItem instanceof FontTag))&& internalViewer) {
    final Tag tag=(Tag)treeItem;
    showCard(CARDPREVIEWPANEL);
    DrawableTag d=(DrawableTag)tag;
    Timelined timelined;
    if (treeItem instanceof Timelined && !(treeItem instanceof ButtonTag)) {
      timelined=(Timelined)tag;
    }
 else {
      timelined=makeTimelined(tag);
    }
    previewPanel.setParametersPanelVisible(false);
    previewPanel.showImagePanel(timelined,tag.getSwf(),-1);
  }
 else   if ((treeItem instanceof FontTag) && internalViewer) {
    FontTag fontTag=(FontTag)treeItem;
    showCard(CARDPREVIEWPANEL);
    showFontTag(fontTag);
  }
 else   if ((treeItem instanceof TextTag) && internalViewer) {
    TextTag textTag=(TextTag)treeItem;
    showCard(CARDPREVIEWPANEL);
    showTextTag(textTag);
  }
 else   if (treeItem instanceof Frame && internalViewer) {
    showCard(CARDPREVIEWPANEL);
    Frame fn=(Frame)treeItem;
    SWF swf=fn.getSwf();
    List<Tag> controlTags=swf.tags;
    int containerId=0;
    RECT rect=swf.displayRect;
    int totalFrameCount=swf.frameCount;
    Timelined timelined=swf;
    if (fn.timeline.timelined instanceof DefineSpriteTag) {
      DefineSpriteTag parentSprite=(DefineSpriteTag)fn.timeline.timelined;
      controlTags=parentSprite.subTags;
      containerId=parentSprite.spriteId;
      rect=parentSprite.getRect();
      totalFrameCount=parentSprite.frameCount;
      timelined=parentSprite;
    }
    previewPanel.showImagePanel(timelined,swf,fn.frame);
  }
 else   if ((treeItem instanceof SoundTag)) {
    showCard(CARDPREVIEWPANEL);
    previewPanel.showImagePanel(new SerializableImage(View.loadImage("String_Node_Str")));
    previewPanel.setImageReplaceButtonVisible(treeItem instanceof DefineSoundTag);
    try {
      SoundTagPlayer soundThread=new SoundTagPlayer((SoundTag)treeItem,Integer.MAX_VALUE,true);
      previewPanel.setMedia(soundThread);
    }
 catch (    LineUnavailableException|IOException|UnsupportedAudioFileException ex) {
      logger.log(Level.SEVERE,null,ex);
    }
  }
 else   if ((treeItem instanceof Frame) || ((treeItem instanceof CharacterTag) || (treeItem instanceof FontTag)) && (treeItem instanceof Tag) || (treeItem instanceof SoundStreamHeadTypeTag)) {
    showCard(CARDPREVIEWPANEL);
    previewPanel.createAndShowTempSwf(treeItem);
    if (treeItem instanceof TextTag) {
      showTextTag((TextTag)treeItem);
    }
 else     if (treeItem instanceof FontTag) {
      showFontTag((FontTag)treeItem);
    }
 else {
      previewPanel.setParametersPanelVisible(false);
    }
  }
 else   if (treeItem instanceof Tag) {
    showGenericTag((Tag)treeItem);
  }
 else {
    showCard(CARDEMPTYPANEL);
  }
}