Program: 21323
Project: 21323
Buggy source:
public PluginStep doStep0(PluginStep step,DownloadLink downloadLink){
  try {
switch (step.getStep()) {
case PluginStep.STEP_DECRYPT:
      String link=(String)downloadLink.getProperty("String_Node_Str");
    String[] mirrors=(String[])downloadLink.getProperty("String_Node_Str");
  downloadLink.setStatusText("String_Node_Str");
downloadLink.requestGuiUpdate();
Vector<DownloadLink> dls=getDLinks(link);
FilePackage fp=downloadLink.getFilePackage();
int index=fp.indexOf(downloadLink);
fp.remove(downloadLink);
Vector<Integer> down=new Vector<Integer>();
Vector<DownloadLink> ret=new Vector<DownloadLink>();
for (int i=dls.size() - 1; i >= 0; i--) {
DistributeData distributeData=new DistributeData(dls.get(i).getDownloadURL());
Vector<DownloadLink> links=distributeData.findLinks();
Iterator<DownloadLink> it2=links.iterator();
boolean online=false;
while (it2.hasNext()) {
DownloadLink downloadLink3=(DownloadLink)it2.next();
if (downloadLink3.isAvailable()) {
fp.add(index,downloadLink3);
online=true;
}
 else {
down.add(i);
}
}
if (online) ret.addAll(links);
}
if (mirrors != null) {
for (int i=0; i < mirrors.length; i++) {
if (down.size() > 0) {
try {
dls=getDLinks(mirrors[i]);
Iterator<Integer> iter=down.iterator();
while (iter.hasNext()) {
Integer integer=(Integer)iter.next();
DistributeData distributeData=new DistributeData(dls.get(down.get(integer)).getDownloadURL());
Vector<DownloadLink> links=distributeData.findLinks();
Iterator<DownloadLink> it2=links.iterator();
boolean online=false;
while (it2.hasNext()) {
DownloadLink downloadLink3=(DownloadLink)it2.next();
if (downloadLink3.isAvailable()) {
fp.add(index,downloadLink3);
online=true;
iter.remove();
}
}
if (online) ret.addAll(links);
}
}
 catch (Exception e) {
}
}
 else break;
}
}
if (down.size() > 0) {
fp.add(downloadLink);
downloadLink.setStatus(DownloadLink.STATUS_ERROR_PLUGIN_SPECIFIC);
step.setStatus(PluginStep.STATUS_ERROR);
step.setParameter(JDLocale.L("String_Node_Str","String_Node_Str"));
return step;
}
}
}
 catch (Exception e) {
}
return null;
}

Fixed version (ground truth):
public PluginStep doStep0(PluginStep step,DownloadLink downloadLink){
  try {
switch (step.getStep()) {
case PluginStep.STEP_DECRYPT:
      String link=(String)downloadLink.getProperty("String_Node_Str");
    String[] mirrors=(String[])downloadLink.getProperty("String_Node_Str");
  downloadLink.setStatusText("String_Node_Str");
downloadLink.requestGuiUpdate();
Vector<DownloadLink> dls=getDLinks(link);
if (dls.size() < 2) {
downloadLink.setStatus(DownloadLink.STATUS_ERROR_PLUGIN_SPECIFIC);
step.setStatus(PluginStep.STATUS_ERROR);
step.setParameter(JDLocale.L("String_Node_Str","String_Node_Str"));
logger.warning("String_Node_Str");
return step;
}
FilePackage fp=downloadLink.getFilePackage();
int index=fp.indexOf(downloadLink);
fp.remove(downloadLink);
Vector<Integer> down=new Vector<Integer>();
Vector<DownloadLink> ret=new Vector<DownloadLink>();
for (int i=dls.size() - 1; i >= 0; i--) {
DistributeData distributeData=new DistributeData(dls.get(i).getDownloadURL());
Vector<DownloadLink> links=distributeData.findLinks();
Iterator<DownloadLink> it2=links.iterator();
boolean online=false;
while (it2.hasNext()) {
DownloadLink downloadLink3=(DownloadLink)it2.next();
if (downloadLink3.isAvailable()) {
fp.add(index,downloadLink3);
online=true;
}
 else {
down.add(i);
}
}
if (online) ret.addAll(links);
}
if (mirrors != null) {
for (int i=0; i < mirrors.length; i++) {
if (down.size() > 0) {
try {
dls=getDLinks(mirrors[i]);
Iterator<Integer> iter=down.iterator();
while (iter.hasNext()) {
Integer integer=(Integer)iter.next();
DistributeData distributeData=new DistributeData(dls.get(down.get(integer)).getDownloadURL());
Vector<DownloadLink> links=distributeData.findLinks();
Iterator<DownloadLink> it2=links.iterator();
boolean online=false;
while (it2.hasNext()) {
DownloadLink downloadLink3=(DownloadLink)it2.next();
if (downloadLink3.isAvailable()) {
fp.add(index,downloadLink3);
online=true;
iter.remove();
}
}
if (online) ret.addAll(links);
}
}
 catch (Exception e) {
}
}
 else break;
}
}
if (down.size() > 0) {
fp.add(downloadLink);
downloadLink.setStatus(DownloadLink.STATUS_ERROR_PLUGIN_SPECIFIC);
step.setStatus(PluginStep.STATUS_ERROR);
step.setParameter(JDLocale.L("String_Node_Str","String_Node_Str"));
return step;
}
}
}
 catch (Exception e) {
}
return null;
}