Program: 21187
Project: 21187
Buggy source:
/** 
 * das controllevent fängt heruntergeladene file ab und wertet sie aus
 */
@SuppressWarnings("String_Node_Str") @Override public void controlEvent(ControlEvent event){
  super.controlEvent(event);
  DownloadLink link;
switch (event.getID()) {
case ControlEvent.CONTROL_PLUGIN_INACTIVE:
    if (this.getPluginConfig().getBooleanProperty("String_Node_Str",true)) {
      if (!(event.getSource() instanceof PluginForHost)) {
        return;
      }
      link=((SingleDownloadController)event.getParameter()).getDownloadLink();
      link=findStartLink(link);
      if (link == null)       return;
      if (link.getLinkStatus().hasStatus(LinkStatus.FINISHED)) {
        if (link.getFilePackage().isExtractAfterDownload() || link.getFilePackage() == FilePackage.getDefaultFilePackage()) {
          if (isArchiveComplete(link)) {
            this.addToQueue(link);
          }
        }
      }
    }
  break;
case ControlEvent.CONTROL_ON_FILEOUTPUT:
if (this.getPluginConfig().getBooleanProperty(JDUnrarConstants.CONFIG_KEY_DEEP_EXTRACT,true)) {
  try {
    File[] list=(File[])event.getParameter();
    for (    File archiveStartFile : list) {
      if (getArchivePartType(archiveStartFile) == JDUnrarConstants.NO_RAR_ARCHIVE || getArchivePartType(archiveStartFile) == JDUnrarConstants.NO_START_PART)       continue;
      link=JDUtilities.getController().getDownloadLinkByFileOutput(archiveStartFile);
      if (link == null) {
        link=new DownloadLink(null,archiveStartFile.getName(),DUMMY_HOSTER,"String_Node_Str",true);
        link.setDownloadSize(archiveStartFile.length());
        FilePackage fp=new FilePackage();
        fp.setDownloadDirectory(archiveStartFile.getParent());
        link.setFilePackage(fp);
      }
      link=this.findStartLink(link);
      if (link == null) {
        continue;
      }
      final DownloadLink finalLink=link;
      System.out.print("String_Node_Str" + archiveStartFile);
      new Thread(){
        public void run(){
          addToQueue(finalLink);
        }
      }
.start();
    }
  }
 catch (  Exception e) {
    e.printStackTrace();
  }
}
break;
case ControlEvent.CONTROL_DOWNLOADLIST_ADDED_LINKS:
ArrayList<DownloadLink> list=(ArrayList<DownloadLink>)event.getParameter();
FilePackage old=null;
for (DownloadLink l : list) {
if (l.getFilePackage() == old) continue;
old=l.getFilePackage();
String[] pws=JDUtilities.passwordStringToArray(l.getFilePackage().getPassword());
for (String pw : pws) {
PasswordList.addPassword(pw);
}
}
PasswordList.save();
break;
case ControlEvent.CONTROL_LINKLIST_CONTEXT_MENU:
ArrayList<MenuItem> items=(ArrayList<MenuItem>)event.getParameter();
MenuItem m;
MenuItem container=new MenuItem(MenuItem.CONTAINER,JDLocale.L("String_Node_Str","String_Node_Str"),0);
items.add(container);
if (event.getSource() instanceof DownloadLink) {
link=(DownloadLink)event.getSource();
container.addMenuItem(m=new MenuItem(MenuItem.NORMAL,JDLocale.L("String_Node_Str","String_Node_Str"),1000).setActionListener(this));
m.setEnabled(false);
boolean isLocalyAvailable=(new File(link.getFileOutput()).exists() || new File(link.getStringProperty(DownloadLink.STATIC_OUTPUTFILE,link.getFileOutput())).exists());
if (isLocalyAvailable && link.getName().matches("String_Node_Str")) m.setEnabled(true);
m.setProperty("String_Node_Str",link);
container.addMenuItem(m=new MenuItem(MenuItem.SEPARATOR));
container.addMenuItem(m=new MenuItem(MenuItem.NORMAL,JDLocale.LF("String_Node_Str","String_Node_Str"),1003).setActionListener(this));
m.setProperty("String_Node_Str",link);
File dir=this.getExtractToPath(link);
while (dir != null && !dir.exists()) dir=dir.getParentFile();
if (dir != null) {
container.addMenuItem(m=new MenuItem(MenuItem.NORMAL,JDLocale.LF("String_Node_Str","String_Node_Str",dir.getAbsolutePath()),1002).setActionListener(this));
m.setProperty("String_Node_Str",link);
}
}
 else {
FilePackage fp=(FilePackage)event.getSource();
container.addMenuItem(m=new MenuItem(MenuItem.NORMAL,JDLocale.L("String_Node_Str","String_Node_Str"),1001).setActionListener(this));
m.setProperty("String_Node_Str",fp);
}
break;
}
}

Fixed version (ground truth):
/** 
 * das controllevent fängt heruntergeladene file ab und wertet sie aus
 */
@SuppressWarnings("String_Node_Str") @Override public void controlEvent(ControlEvent event){
  super.controlEvent(event);
  DownloadLink link;
switch (event.getID()) {
case ControlEvent.CONTROL_PLUGIN_INACTIVE:
    if (this.getPluginConfig().getBooleanProperty("String_Node_Str",true)) {
      if (!(event.getSource() instanceof PluginForHost)) {
        return;
      }
      link=((SingleDownloadController)event.getParameter()).getDownloadLink();
      link=findStartLink(link);
      if (link == null)       return;
      if (link.getLinkStatus().hasStatus(LinkStatus.FINISHED)) {
        if (link.getFilePackage().isExtractAfterDownload() || link.getFilePackage() == FilePackage.getDefaultFilePackage()) {
          if (isArchiveComplete(link)) {
            this.addToQueue(link);
          }
        }
      }
    }
  break;
case ControlEvent.CONTROL_ON_FILEOUTPUT:
if (this.getPluginConfig().getBooleanProperty(JDUnrarConstants.CONFIG_KEY_DEEP_EXTRACT,true)) {
  try {
    File[] list=(File[])event.getParameter();
    for (    File archiveStartFile : list) {
      if (getArchivePartType(archiveStartFile) == JDUnrarConstants.NO_RAR_ARCHIVE || getArchivePartType(archiveStartFile) == JDUnrarConstants.NO_START_PART)       continue;
      link=JDUtilities.getController().getDownloadLinkByFileOutput(archiveStartFile);
      if (link == null) {
        link=new DownloadLink(null,archiveStartFile.getName(),DUMMY_HOSTER,"String_Node_Str",true);
        link.setDownloadSize(archiveStartFile.length());
        FilePackage fp=new FilePackage();
        fp.setDownloadDirectory(archiveStartFile.getParent());
        link.setFilePackage(fp);
      }
      link=this.findStartLink(link);
      if (link == null) {
        continue;
      }
      final DownloadLink finalLink=link;
      System.out.print("String_Node_Str" + archiveStartFile);
      new Thread(){
        public void run(){
          addToQueue(finalLink);
        }
      }
.start();
    }
  }
 catch (  Exception e) {
    e.printStackTrace();
  }
}
break;
case ControlEvent.CONTROL_DOWNLOADLIST_ADDED_LINKS:
ArrayList<DownloadLink> list=(ArrayList<DownloadLink>)event.getParameter();
FilePackage old=null;
for (DownloadLink l : list) {
if (l.getFilePackage() == old) continue;
old=l.getFilePackage();
String[] pws=JDUtilities.passwordStringToArray(l.getFilePackage().getPassword());
for (String pw : pws) {
PasswordList.addPassword(pw);
}
}
PasswordList.save();
break;
case ControlEvent.CONTROL_LINKLIST_CONTEXT_MENU:
ArrayList<MenuItem> items=(ArrayList<MenuItem>)event.getParameter();
MenuItem m;
MenuItem container=new MenuItem(MenuItem.CONTAINER,JDLocale.L("String_Node_Str","String_Node_Str"),0);
items.add(container);
if (event.getSource() instanceof DownloadLink) {
link=(DownloadLink)event.getSource();
container.addMenuItem(m=new MenuItem(MenuItem.NORMAL,JDLocale.L("String_Node_Str","String_Node_Str"),1000).setActionListener(this));
m.setEnabled(false);
boolean isLocalyAvailable=(new File(link.getFileOutput()).exists() || new File(link.getStringProperty(DownloadLink.STATIC_OUTPUTFILE,link.getFileOutput())).exists());
if (isLocalyAvailable && link.getName().matches("String_Node_Str")) m.setEnabled(true);
m.setProperty("String_Node_Str",link);
container.addMenuItem(m=new MenuItem(MenuItem.TOGGLE,JDLocale.L("String_Node_Str","String_Node_Str"),1005).setActionListener(this));
m.setSelected(link.getFilePackage().isExtractAfterDownload());
m.setProperty("String_Node_Str",link);
container.addMenuItem(m=new MenuItem(MenuItem.SEPARATOR));
container.addMenuItem(m=new MenuItem(MenuItem.NORMAL,JDLocale.LF("String_Node_Str","String_Node_Str"),1003).setActionListener(this));
m.setProperty("String_Node_Str",link);
File dir=this.getExtractToPath(link);
while (dir != null && !dir.exists()) dir=dir.getParentFile();
container.addMenuItem(m=new MenuItem(MenuItem.NORMAL,JDLocale.LF("String_Node_Str","String_Node_Str",dir.getAbsolutePath()),1002).setActionListener(this));
m.setEnabled(dir != null);
m.setProperty(JDUnrarConstants.DOWNLOADLINK_KEY_EXTRACTEDPATH + "String_Node_Str",dir.getAbsolutePath());
m.setProperty("String_Node_Str",link);
}
 else {
FilePackage fp=(FilePackage)event.getSource();
container.addMenuItem(m=new MenuItem(MenuItem.NORMAL,JDLocale.L("String_Node_Str","String_Node_Str"),1001).setActionListener(this));
m.setProperty("String_Node_Str",fp);
container.addMenuItem(m=new MenuItem(MenuItem.TOGGLE,JDLocale.L("String_Node_Str","String_Node_Str"),1006).setActionListener(this));
m.setSelected(fp.isExtractAfterDownload());
m.setProperty("String_Node_Str",fp);
}
break;
}
}