Program: 61921
Project: 61921
Buggy source:
@Override public void actionPerformed(ActionEvent e){
switch (e.getActionCommand()) {
case ACTION_RELOAD:
    if (View.showConfirmDialog(null,translate("String_Node_Str"),translate("String_Node_Str"),JOptionPane.YES_NO_OPTION,JOptionPane.WARNING_MESSAGE) == JOptionPane.YES_OPTION) {
      Main.reloadApp();
    }
  break;
case ACTION_ADVANCED_SETTINGS:
Main.advancedSettings();
break;
case ACTION_LOAD_MEMORY:
Main.loadFromMemory();
break;
case ACTION_LOAD_CACHE:
Main.loadFromCache();
break;
case ACTION_GOTO_DOCUMENT_CLASS_ON_STARTUP:
Configuration.gotoMainClassOnStartup.set(miGotoMainClassOnStartup.isSelected());
break;
case ACTION_AUTO_RENAME_IDENTIFIERS:
Configuration.autoRenameIdentifiers.set(miAutoRenameIdentifiers.isSelected());
break;
case ACTION_CACHE_ON_DISK:
Configuration.cacheOnDisk.set(miCacheDisk.isSelected());
if (miCacheDisk.isSelected()) {
Cache.setStorageType(Cache.STORAGE_FILES);
}
 else {
Cache.setStorageType(Cache.STORAGE_MEMORY);
}
break;
case ACTION_SET_LANGUAGE:
new SelectLanguageDialog().display();
break;
case ACTION_DISABLE_DECOMPILATION:
Configuration.decompile.set(!miDecompile.isSelected());
mainFrame.panel.disableDecompilationChanged();
break;
case ACTION_ASSOCIATE:
if (miAssociate.isSelected() == ContextMenuTools.isAddedToContextMenu()) {
return;
}
ContextMenuTools.addToContextMenu(miAssociate.isSelected());
new Timer().schedule(new TimerTask(){
@Override public void run(){
miAssociate.setSelected(ContextMenuTools.isAddedToContextMenu());
}
}
,1000);
break;
case ACTION_GOTO_DOCUMENT_CLASS:
mainFrame.panel.gotoDocumentClass(mainFrame.panel.getCurrentSwf());
break;
case ACTION_PARALLEL_SPEED_UP:
String confStr=translate("String_Node_Str") + "String_Node_Str";
if (miParallelSpeedUp.isSelected()) {
confStr+="String_Node_Str" + translate("String_Node_Str");
}
 else {
confStr+="String_Node_Str" + translate("String_Node_Str");
}
if (View.showConfirmDialog(null,confStr,translate("String_Node_Str"),JOptionPane.OK_CANCEL_OPTION) == JOptionPane.OK_OPTION) {
Configuration.parallelSpeedUp.set((Boolean)miParallelSpeedUp.isSelected());
}
 else {
miParallelSpeedUp.setSelected(!miParallelSpeedUp.isSelected());
}
break;
case ACTION_INTERNAL_VIEWER_SWITCH:
Configuration.internalFlashViewer.set(miInternalViewer.isSelected());
mainFrame.panel.reload(true);
break;
case ACTION_SEARCH_AS:
mainFrame.panel.searchAs();
break;
case ACTION_AUTO_DEOBFUSCATE:
if (View.showConfirmDialog(mainFrame.panel,translate("String_Node_Str") + "String_Node_Str" + (miAutoDeobfuscation.isSelected() ? translate("String_Node_Str") : translate("String_Node_Str")),translate("String_Node_Str"),JOptionPane.OK_CANCEL_OPTION) == JOptionPane.OK_OPTION) {
Configuration.autoDeobfuscate.set(miAutoDeobfuscation.isSelected());
mainFrame.panel.autoDeobfuscateChanged();
}
 else {
miAutoDeobfuscation.setSelected(!miAutoDeobfuscation.isSelected());
}
break;
case ACTION_EXIT:
mainFrame.panel.setVisible(false);
if (Main.proxyFrame != null) {
if (Main.proxyFrame.isVisible()) {
return;
}
}
Main.exit();
break;
}
if (Main.isWorking()) {
return;
}
switch (e.getActionCommand()) {
case ACTION_RENAME_ONE_IDENTIFIER:
mainFrame.panel.renameOneIdentifier(mainFrame.panel.getCurrentSwf());
break;
case ACTION_ABOUT:
Main.about();
break;
case ACTION_SHOW_PROXY:
Main.showProxy();
break;
case ACTION_SUB_LIMITER:
if (e.getSource() instanceof JCheckBoxMenuItem) {
Main.setSubLimiter(((JCheckBoxMenuItem)e.getSource()).getState());
}
break;
case ACTION_SAVE:
try {
SWF swf=mainFrame.panel.getCurrentSwf();
Main.saveFile(swf,swf.file);
}
 catch (IOException ex) {
Logger.getLogger(MainFrameClassicMenu.class.getName()).log(Level.SEVERE,null,ex);
View.showMessageDialog(null,translate("String_Node_Str"),translate("String_Node_Str"),JOptionPane.ERROR_MESSAGE);
}
break;
case ACTION_SAVE_AS:
{
SWF swf=mainFrame.panel.getCurrentSwf();
if (Main.saveFileDialog(swf)) {
mainFrame.setTitle(ApplicationInfo.applicationVerName + (Configuration.displayFileName.get() ? "String_Node_Str" + swf.getFileTitle() : "String_Node_Str"));
saveCommandButton.setEnabled(mainFrame.panel.getCurrentSwf() != null);
}
}
break;
case ACTION_SAVE_AS_EXE:
{
SWF swf=mainFrame.panel.getCurrentSwf();
if (Main.saveFileDialog(swf,"String_Node_Str")) {
mainFrame.setTitle(ApplicationInfo.applicationVerName + (Configuration.displayFileName.get() ? "String_Node_Str" + swf.getFileTitle() : "String_Node_Str"));
saveCommandButton.setEnabled(mainFrame.panel.getCurrentSwf() != null);
}
}
break;
case ACTION_OPEN:
Main.openFileDialog();
break;
case ACTION_EXPORT_FLA:
mainFrame.panel.exportFla(mainFrame.panel.getCurrentSwf());
break;
case ACTION_EXPORT_SEL:
case ACTION_EXPORT:
boolean onlySel=e.getActionCommand().endsWith("String_Node_Str");
mainFrame.panel.export(onlySel);
break;
case ACTION_CHECK_UPDATES:
if (!Main.checkForUpdates()) {
View.showMessageDialog(null,translate("String_Node_Str"),translate("String_Node_Str"),JOptionPane.INFORMATION_MESSAGE);
}
break;
case ACTION_HELP_US:
String helpUsURL=ApplicationInfo.PROJECT_PAGE + "String_Node_Str";
if (java.awt.Desktop.isDesktopSupported()) {
java.awt.Desktop desktop=java.awt.Desktop.getDesktop();
try {
java.net.URI uri=new java.net.URI(helpUsURL);
desktop.browse(uri);
}
 catch (URISyntaxException|IOException ex) {
}
}
 else {
View.showMessageDialog(null,translate("String_Node_Str").replace("String_Node_Str",helpUsURL));
}
break;
case ACTION_HOMEPAGE:
String homePageURL=ApplicationInfo.PROJECT_PAGE;
if (java.awt.Desktop.isDesktopSupported()) {
java.awt.Desktop desktop=java.awt.Desktop.getDesktop();
try {
java.net.URI uri=new java.net.URI(homePageURL);
desktop.browse(uri);
}
 catch (URISyntaxException|IOException ex) {
}
}
 else {
View.showMessageDialog(null,translate("String_Node_Str").replace("String_Node_Str",homePageURL));
}
break;
case ACTION_RESTORE_CONTROL_FLOW:
case ACTION_RESTORE_CONTROL_FLOW_ALL:
boolean all=e.getActionCommand().endsWith("String_Node_Str");
mainFrame.panel.restoreControlFlow(all);
break;
case ACTION_RENAME_IDENTIFIERS:
mainFrame.panel.renameIdentifiers(mainFrame.panel.getCurrentSwf());
break;
case ACTION_DEOBFUSCATE:
case ACTION_DEOBFUSCATE_ALL:
mainFrame.panel.deobfuscate();
break;
case ACTION_REMOVE_NON_SCRIPTS:
mainFrame.panel.removeNonScripts(mainFrame.panel.getCurrentSwf());
break;
case ACTION_REFRESH_DECOMPILED:
mainFrame.panel.refreshDecompiled();
break;
}
}

Fixed version (ground truth):
@Override public void actionPerformed(ActionEvent e){
switch (e.getActionCommand()) {
case ACTION_RELOAD:
    if (View.showConfirmDialog(null,translate("String_Node_Str"),translate("String_Node_Str"),JOptionPane.YES_NO_OPTION,JOptionPane.WARNING_MESSAGE) == JOptionPane.YES_OPTION) {
      Main.reloadApp();
    }
  break;
case ACTION_ADVANCED_SETTINGS:
Main.advancedSettings();
break;
case ACTION_LOAD_MEMORY:
Main.loadFromMemory();
break;
case ACTION_LOAD_CACHE:
Main.loadFromCache();
break;
case ACTION_GOTO_DOCUMENT_CLASS_ON_STARTUP:
Configuration.gotoMainClassOnStartup.set(miGotoMainClassOnStartup.isSelected());
break;
case ACTION_AUTO_RENAME_IDENTIFIERS:
Configuration.autoRenameIdentifiers.set(miAutoRenameIdentifiers.isSelected());
break;
case ACTION_CACHE_ON_DISK:
Configuration.cacheOnDisk.set(miCacheDisk.isSelected());
if (miCacheDisk.isSelected()) {
Cache.setStorageType(Cache.STORAGE_FILES);
}
 else {
Cache.setStorageType(Cache.STORAGE_MEMORY);
}
break;
case ACTION_SET_LANGUAGE:
new SelectLanguageDialog().display();
break;
case ACTION_DISABLE_DECOMPILATION:
Configuration.decompile.set(!miDecompile.isSelected());
mainFrame.panel.disableDecompilationChanged();
break;
case ACTION_ASSOCIATE:
if (miAssociate.isSelected() == ContextMenuTools.isAddedToContextMenu()) {
return;
}
ContextMenuTools.addToContextMenu(miAssociate.isSelected(),false);
new Timer().schedule(new TimerTask(){
@Override public void run(){
miAssociate.setSelected(ContextMenuTools.isAddedToContextMenu());
}
}
,1000);
break;
case ACTION_GOTO_DOCUMENT_CLASS:
mainFrame.panel.gotoDocumentClass(mainFrame.panel.getCurrentSwf());
break;
case ACTION_PARALLEL_SPEED_UP:
String confStr=translate("String_Node_Str") + "String_Node_Str";
if (miParallelSpeedUp.isSelected()) {
confStr+="String_Node_Str" + translate("String_Node_Str");
}
 else {
confStr+="String_Node_Str" + translate("String_Node_Str");
}
if (View.showConfirmDialog(null,confStr,translate("String_Node_Str"),JOptionPane.OK_CANCEL_OPTION) == JOptionPane.OK_OPTION) {
Configuration.parallelSpeedUp.set((Boolean)miParallelSpeedUp.isSelected());
}
 else {
miParallelSpeedUp.setSelected(!miParallelSpeedUp.isSelected());
}
break;
case ACTION_INTERNAL_VIEWER_SWITCH:
Configuration.internalFlashViewer.set(miInternalViewer.isSelected());
mainFrame.panel.reload(true);
break;
case ACTION_SEARCH_AS:
mainFrame.panel.searchAs();
break;
case ACTION_AUTO_DEOBFUSCATE:
if (View.showConfirmDialog(mainFrame.panel,translate("String_Node_Str") + "String_Node_Str" + (miAutoDeobfuscation.isSelected() ? translate("String_Node_Str") : translate("String_Node_Str")),translate("String_Node_Str"),JOptionPane.OK_CANCEL_OPTION) == JOptionPane.OK_OPTION) {
Configuration.autoDeobfuscate.set(miAutoDeobfuscation.isSelected());
mainFrame.panel.autoDeobfuscateChanged();
}
 else {
miAutoDeobfuscation.setSelected(!miAutoDeobfuscation.isSelected());
}
break;
case ACTION_EXIT:
mainFrame.panel.setVisible(false);
if (Main.proxyFrame != null) {
if (Main.proxyFrame.isVisible()) {
return;
}
}
Main.exit();
break;
}
if (Main.isWorking()) {
return;
}
switch (e.getActionCommand()) {
case ACTION_RENAME_ONE_IDENTIFIER:
mainFrame.panel.renameOneIdentifier(mainFrame.panel.getCurrentSwf());
break;
case ACTION_ABOUT:
Main.about();
break;
case ACTION_SHOW_PROXY:
Main.showProxy();
break;
case ACTION_SUB_LIMITER:
if (e.getSource() instanceof JCheckBoxMenuItem) {
Main.setSubLimiter(((JCheckBoxMenuItem)e.getSource()).getState());
}
break;
case ACTION_SAVE:
try {
SWF swf=mainFrame.panel.getCurrentSwf();
Main.saveFile(swf,swf.file);
}
 catch (IOException ex) {
Logger.getLogger(MainFrameClassicMenu.class.getName()).log(Level.SEVERE,null,ex);
View.showMessageDialog(null,translate("String_Node_Str"),translate("String_Node_Str"),JOptionPane.ERROR_MESSAGE);
}
break;
case ACTION_SAVE_AS:
{
SWF swf=mainFrame.panel.getCurrentSwf();
if (Main.saveFileDialog(swf)) {
mainFrame.setTitle(ApplicationInfo.applicationVerName + (Configuration.displayFileName.get() ? "String_Node_Str" + swf.getFileTitle() : "String_Node_Str"));
saveCommandButton.setEnabled(mainFrame.panel.getCurrentSwf() != null);
}
}
break;
case ACTION_SAVE_AS_EXE:
{
SWF swf=mainFrame.panel.getCurrentSwf();
if (Main.saveFileDialog(swf,"String_Node_Str")) {
mainFrame.setTitle(ApplicationInfo.applicationVerName + (Configuration.displayFileName.get() ? "String_Node_Str" + swf.getFileTitle() : "String_Node_Str"));
saveCommandButton.setEnabled(mainFrame.panel.getCurrentSwf() != null);
}
}
break;
case ACTION_OPEN:
Main.openFileDialog();
break;
case ACTION_EXPORT_FLA:
mainFrame.panel.exportFla(mainFrame.panel.getCurrentSwf());
break;
case ACTION_EXPORT_SEL:
case ACTION_EXPORT:
boolean onlySel=e.getActionCommand().endsWith("String_Node_Str");
mainFrame.panel.export(onlySel);
break;
case ACTION_CHECK_UPDATES:
if (!Main.checkForUpdates()) {
View.showMessageDialog(null,translate("String_Node_Str"),translate("String_Node_Str"),JOptionPane.INFORMATION_MESSAGE);
}
break;
case ACTION_HELP_US:
String helpUsURL=ApplicationInfo.PROJECT_PAGE + "String_Node_Str";
if (java.awt.Desktop.isDesktopSupported()) {
java.awt.Desktop desktop=java.awt.Desktop.getDesktop();
try {
java.net.URI uri=new java.net.URI(helpUsURL);
desktop.browse(uri);
}
 catch (URISyntaxException|IOException ex) {
}
}
 else {
View.showMessageDialog(null,translate("String_Node_Str").replace("String_Node_Str",helpUsURL));
}
break;
case ACTION_HOMEPAGE:
String homePageURL=ApplicationInfo.PROJECT_PAGE;
if (java.awt.Desktop.isDesktopSupported()) {
java.awt.Desktop desktop=java.awt.Desktop.getDesktop();
try {
java.net.URI uri=new java.net.URI(homePageURL);
desktop.browse(uri);
}
 catch (URISyntaxException|IOException ex) {
}
}
 else {
View.showMessageDialog(null,translate("String_Node_Str").replace("String_Node_Str",homePageURL));
}
break;
case ACTION_RESTORE_CONTROL_FLOW:
case ACTION_RESTORE_CONTROL_FLOW_ALL:
boolean all=e.getActionCommand().endsWith("String_Node_Str");
mainFrame.panel.restoreControlFlow(all);
break;
case ACTION_RENAME_IDENTIFIERS:
mainFrame.panel.renameIdentifiers(mainFrame.panel.getCurrentSwf());
break;
case ACTION_DEOBFUSCATE:
case ACTION_DEOBFUSCATE_ALL:
mainFrame.panel.deobfuscate();
break;
case ACTION_REMOVE_NON_SCRIPTS:
mainFrame.panel.removeNonScripts(mainFrame.panel.getCurrentSwf());
break;
case ACTION_REFRESH_DECOMPILED:
mainFrame.panel.refreshDecompiled();
break;
}
}