Program: 21267
Project: 21267
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);
switch (event.getID()) {
case ControlEvent.CONTROL_PLUGIN_INACTIVE:
    if (!(event.getSource() instanceof PluginForHost)) {
      return;
    }
  DownloadLink link=((SingleDownloadController)event.getParameter()).getDownloadLink();
link=findStartLink(link);
if (link.getLinkStatus().hasStatus(LinkStatus.FINISHED)) {
if (link.getFilePackage().isExtractAfterDownload()) {
  if (getArchivePartType(link) == JDUnrarConstants.MULTIPART_START_PART || getArchivePartType(link) == JDUnrarConstants.SINGLE_PART_ARCHIVE) {
    if (archiveIsComplete(link)) {
      this.addToQueue(link);
    }
  }
}
}
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=PasswordList.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;
if (event.getSource() instanceof DownloadLink) {
link=(DownloadLink)event.getSource();
items.add(m=new MenuItem(MenuItem.NORMAL,JDLocale.L(LOCALE_PREFIX + "String_Node_Str","String_Node_Str"),1000).setActionListener(this));
m.setEnabled(link.getLinkStatus().hasStatus(LinkStatus.FINISHED) && link.getName().matches("String_Node_Str"));
m.setProperty("String_Node_Str",link);
items.add(m=new MenuItem(MenuItem.NORMAL,JDLocale.L(LOCALE_PREFIX + "String_Node_Str","String_Node_Str"),1002).setActionListener(this));
m.setEnabled(link.getStringProperty("String_Node_Str") != null);
m.setProperty("String_Node_Str",link);
}
 else {
FilePackage fp=(FilePackage)event.getSource();
items.add(m=new MenuItem(MenuItem.NORMAL,JDLocale.L(LOCALE_PREFIX + "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);
switch (event.getID()) {
case ControlEvent.CONTROL_PLUGIN_INACTIVE:
    if (!(event.getSource() instanceof PluginForHost)) {
      return;
    }
  DownloadLink link=((SingleDownloadController)event.getParameter()).getDownloadLink();
link=findStartLink(link);
if (link.getLinkStatus().hasStatus(LinkStatus.FINISHED)) {
if (link.getFilePackage().isExtractAfterDownload()) {
  if (getArchivePartType(link) == JDUnrarConstants.MULTIPART_START_PART || getArchivePartType(link) == JDUnrarConstants.SINGLE_PART_ARCHIVE) {
    if (archiveIsComplete(link)) {
      this.addToQueue(link);
    }
  }
}
}
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=PasswordList.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;
if (event.getSource() instanceof DownloadLink) {
link=(DownloadLink)event.getSource();
items.add(m=new MenuItem(MenuItem.NORMAL,JDLocale.L(LOCALE_PREFIX + "String_Node_Str","String_Node_Str"),1000).setActionListener(this));
m.setEnabled(false);
if (link.getLinkStatus().hasStatus(LinkStatus.FINISHED) && link.getName().matches("String_Node_Str")) m.setEnabled(true);
if (new File(link.getFileOutput()).exists() && link.getName().matches("String_Node_Str")) m.setEnabled(true);
m.setProperty("String_Node_Str",link);
items.add(m=new MenuItem(MenuItem.NORMAL,JDLocale.L(LOCALE_PREFIX + "String_Node_Str","String_Node_Str"),1002).setActionListener(this));
m.setEnabled(link.getStringProperty("String_Node_Str") != null);
m.setProperty("String_Node_Str",link);
}
 else {
FilePackage fp=(FilePackage)event.getSource();
items.add(m=new MenuItem(MenuItem.NORMAL,JDLocale.L(LOCALE_PREFIX + "String_Node_Str","String_Node_Str"),1001).setActionListener(this));
m.setProperty("String_Node_Str",fp);
}
break;
}
}