Program: 168522
Project: 168522
Buggy source:
private int extractRecursive(FSEntry rec,LinkedList<String> pathStack,File outDir,ProgressMonitor progressDialog,ObjectContainer<Boolean> overwriteAll,boolean dataFork,boolean resourceFork){
  System.err.println("String_Node_Str" + Util.concatenateStrings(pathStack,"String_Node_Str"));
  if (!dataFork && !resourceFork) {
    throw new IllegalArgumentException("String_Node_Str");
  }
  if (progressDialog.cancelSignaled()) {
    return 0;
  }
  int errorCount=0;
  if (!outDir.exists()) {
    String[] options=new String[]{"String_Node_Str","String_Node_Str"};
    int reply=JOptionPane.showOptionDialog(this,"String_Node_Str" + outDir.getAbsolutePath() + "String_Node_Str"+ "String_Node_Str","String_Node_Str",JOptionPane.YES_NO_CANCEL_OPTION,JOptionPane.WARNING_MESSAGE,null,options,options[0]);
    if (reply != 0) {
      ++errorCount;
      progressDialog.signalCancel();
      return errorCount;
    }
 else {
      if (!outDir.mkdirs()) {
        JOptionPane.showMessageDialog(this,"String_Node_Str" + outDir.getAbsolutePath() + "String_Node_Str","String_Node_Str",JOptionPane.ERROR_MESSAGE);
        ++errorCount;
        progressDialog.signalCancel();
        return errorCount;
      }
    }
  }
  if (rec instanceof FSLink) {
    String[] pathStackArray=pathStack.toArray(new String[pathStack.size()]);
    FSEntry linkTarget=((FSLink)rec).getLinkTarget(pathStackArray);
    if (linkTarget != null)     rec=linkTarget;
  }
  if (rec instanceof FSFile) {
    if (dataFork) {
      errorCount+=extractFile((FSFile)rec,outDir,progressDialog,overwriteAll,false);
    }
    if (resourceFork) {
      errorCount+=extractFile((FSFile)rec,outDir,progressDialog,overwriteAll,true);
    }
  }
 else   if (rec instanceof FSFolder) {
    String dirName=rec.getName();
    progressDialog.updateCurrentDir(dirName);
    FSEntry[] contents=((FSFolder)rec).list();
    File thisDir=new File(outDir,dirName);
    if (!overwriteAll.o && thisDir.exists()) {
      String[] options=new String[]{"String_Node_Str","String_Node_Str"};
      int reply=JOptionPane.showOptionDialog(this,"String_Node_Str" + thisDir.getAbsolutePath() + "String_Node_Str"+ "String_Node_Str","String_Node_Str",JOptionPane.YES_NO_CANCEL_OPTION,JOptionPane.WARNING_MESSAGE,null,options,options[0]);
      if (reply != 0) {
        ++errorCount;
        progressDialog.signalCancel();
        return errorCount;
      }
    }
    if (thisDir.mkdir() || thisDir.exists()) {
      pathStack.addLast(rec.getName());
      try {
        for (        FSEntry outRec : contents) {
          errorCount+=extractRecursive(outRec,pathStack,thisDir,progressDialog,overwriteAll,dataFork,resourceFork);
        }
      }
  finally {
        pathStack.removeLast();
      }
    }
 else {
      int reply=JOptionPane.showConfirmDialog(this,"String_Node_Str" + thisDir.getAbsolutePath() + "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str","String_Node_Str",JOptionPane.YES_NO_OPTION,JOptionPane.ERROR_MESSAGE);
      if (reply == JOptionPane.NO_OPTION) {
        progressDialog.signalCancel();
      }
      ++errorCount;
    }
  }
  return errorCount;
}

Fixed version (ground truth):
private void extractRecursive(FSEntry rec,LinkedList<String> pathStack,LinkedList<String[]> absPathsStack,File outDir,ProgressMonitor progressDialog,LinkedList<String> errorMessages,ObjectContainer<Boolean> overwriteAll,boolean dataFork,boolean resourceFork){
  if (!dataFork && !resourceFork) {
    throw new IllegalArgumentException("String_Node_Str");
  }
  if (progressDialog.cancelSignaled()) {
    return;
  }
  if (!outDir.exists()) {
    String[] options=new String[]{"String_Node_Str","String_Node_Str"};
    int reply=JOptionPane.showOptionDialog(this,"String_Node_Str" + "String_Node_Str" + outDir.getAbsolutePath() + "String_Node_Str"+ "String_Node_Str","String_Node_Str",JOptionPane.YES_NO_CANCEL_OPTION,JOptionPane.WARNING_MESSAGE,null,options,options[0]);
    if (reply != 0) {
      errorMessages.addLast("String_Node_Str" + outDir.getAbsolutePath() + "String_Node_Str");
      progressDialog.signalCancel();
      return;
    }
 else {
      if (!outDir.mkdirs()) {
        JOptionPane.showMessageDialog(this,"String_Node_Str" + outDir.getAbsolutePath() + "String_Node_Str","String_Node_Str",JOptionPane.ERROR_MESSAGE);
        errorMessages.addLast("String_Node_Str" + outDir.getAbsolutePath() + "String_Node_Str");
        progressDialog.signalCancel();
        return;
      }
    }
  }
  String[] absolutePath=null;
  if (rec instanceof FSLink) {
    FSLink curLink=(FSLink)rec;
    String[] pathStackArray=pathStack.toArray(new String[pathStack.size()]);
    String[] targetPath=fsHandler.getTargetPath(curLink,pathStackArray);
    if (targetPath != null) {
      if (Util.contains(absPathsStack,targetPath)) {
        System.err.println();
        System.err.println("String_Node_Str");
        System.err.println();
        errorMessages.addLast("String_Node_Str" + curLink.getName() + "String_Node_Str"+ Util.concatenateStrings(pathStackArray,"String_Node_Str")+ "String_Node_Str");
        return;
      }
      FSEntry linkTarget=fsHandler.getEntry(targetPath);
      if (linkTarget != null) {
        rec=linkTarget;
        absolutePath=targetPath;
      }
 else {
        errorMessages.addLast("String_Node_Str" + Util.concatenateStrings(targetPath,"String_Node_Str") + "String_Node_Str");
        return;
      }
    }
 else {
      errorMessages.addLast("String_Node_Str" + curLink.getLinkTargetString() + "String_Node_Str"+ Util.concatenateStrings(pathStackArray,"String_Node_Str")+ "String_Node_Str");
      return;
    }
  }
  if (rec instanceof FSFile) {
    if (dataFork) {
      extractFile((FSFile)rec,outDir,progressDialog,errorMessages,overwriteAll,false);
    }
    if (resourceFork) {
      extractFile((FSFile)rec,outDir,progressDialog,errorMessages,overwriteAll,true);
    }
  }
 else   if (rec instanceof FSFolder) {
    String dirName=rec.getName();
    progressDialog.updateCurrentDir(dirName);
    FSEntry[] contents=((FSFolder)rec).listEntries();
    File thisDir=new File(outDir,dirName);
    if (!overwriteAll.o && thisDir.exists()) {
      String[] options=new String[]{"String_Node_Str","String_Node_Str"};
      int reply=JOptionPane.showOptionDialog(this,"String_Node_Str" + thisDir.getAbsolutePath() + "String_Node_Str"+ "String_Node_Str","String_Node_Str",JOptionPane.YES_NO_CANCEL_OPTION,JOptionPane.WARNING_MESSAGE,null,options,options[0]);
      if (reply != 0) {
        errorMessages.addLast("String_Node_Str" + thisDir.getAbsolutePath() + "String_Node_Str");
        progressDialog.signalCancel();
        return;
      }
    }
    if (thisDir.mkdir() || thisDir.exists()) {
      pathStack.addLast(rec.getName());
      if (absolutePath != null)       absPathsStack.addLast(absolutePath);
      try {
        System.err.println("String_Node_Str" + Util.concatenateStrings(pathStack,"String_Node_Str"));
        System.err.println("String_Node_Str");
        for (        String[] cur : absPathsStack) {
          System.err.println("String_Node_Str" + Util.concatenateStrings(cur,"String_Node_Str"));
        }
        for (        FSEntry outRec : contents) {
          extractRecursive(outRec,pathStack,absPathsStack,thisDir,progressDialog,errorMessages,overwriteAll,dataFork,resourceFork);
        }
      }
  finally {
        if (absolutePath != null)         absPathsStack.removeLast();
        pathStack.removeLast();
      }
    }
 else {
      int reply=JOptionPane.showConfirmDialog(this,"String_Node_Str" + thisDir.getAbsolutePath() + "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str","String_Node_Str",JOptionPane.YES_NO_OPTION,JOptionPane.ERROR_MESSAGE);
      if (reply == JOptionPane.NO_OPTION) {
        progressDialog.signalCancel();
      }
 else       errorMessages.addLast("String_Node_Str" + thisDir.getAbsolutePath() + "String_Node_Str");
      return;
    }
  }
}