Program: 45178
Project: 45178
Buggy source:
/** 
 * Copies recursively the given file or folder. 
 * @param file the file or folder to move
 * @param recurseParams destination folder where the given file will be copied (null for top level files)
 * @return <code>true</code> if the file has been copied.
 */
protected boolean processFile(AbstractFile file,Object recurseParams){
  if (getState() == INTERRUPTED)   return false;
  AbstractFile destFolder=recurseParams == null ? baseDestFolder : (AbstractFile)recurseParams;
  boolean isFileInBaseFolder=files.indexOf(file) != -1;
  if (mode == UNPACK_MODE && isFileInBaseFolder) {
    do {
      try {
        AbstractFile archiveFiles[]=currentFile.ls();
        for (int j=0; j < archiveFiles.length && getState() != INTERRUPTED; j++) {
          nextFile(archiveFiles[j]);
          processFile(archiveFiles[j],destFolder);
        }
        return true;
      }
 catch (      IOException e) {
        int ret=showErrorDialog(errorDialogTitle,Translator.get("String_Node_Str",currentFile.getName()));
        if (ret == RETRY_ACTION)         continue;
        return false;
      }
    }
 while (true);
  }
  String originalName=file.getName();
  String destFileName;
  if (isFileInBaseFolder && newName != null)   destFileName=newName;
 else   destFileName=originalName;
  AbstractFile destFile;
  do {
    try {
      destFile=destFolder.getDirectChild(destFileName);
      currentDestFile=destFile;
      break;
    }
 catch (    IOException e) {
      int ret=showErrorDialog(errorDialogTitle,Translator.get("String_Node_Str",destFileName));
      if (ret == RETRY_ACTION)       continue;
      return false;
    }
  }
 while (true);
  if (file.isSymlink())   return true;
  int collision=FileCollisionChecker.checkForCollision(file,destFile);
  boolean append=false;
  if (collision != FileCollisionChecker.NO_COLLOSION) {
    int choice;
    if (defaultFileExistsAction == FileCollisionDialog.ASK_ACTION) {
      FileCollisionDialog dialog=new FileCollisionDialog(progressDialog,mainFrame,collision,file,destFile,true);
      choice=waitForUserResponse(dialog);
      if (dialog.applyToAllSelected())       defaultFileExistsAction=choice;
    }
 else     choice=defaultFileExistsAction;
    if (choice == -1 || choice == FileCollisionDialog.CANCEL_ACTION) {
      interrupt();
      return false;
    }
 else     if (choice == FileCollisionDialog.SKIP_ACTION) {
      return false;
    }
 else     if (choice == FileCollisionDialog.RESUME_ACTION) {
      append=true;
    }
 else     if (choice == FileCollisionDialog.OVERWRITE_ACTION) {
    }
 else     if (choice == FileCollisionDialog.OVERWRITE_IF_OLDER_ACTION) {
      if (file.getDate() <= destFile.getDate())       return false;
    }
  }
  if (file.isDirectory()) {
    if (!(destFile.exists() && destFile.isDirectory())) {
      do {
        try {
          destFile.mkdir();
        }
 catch (        IOException e) {
          int ret=showErrorDialog(errorDialogTitle,Translator.get("String_Node_Str",destFileName));
          if (ret == RETRY_ACTION)           continue;
          return false;
        }
        break;
      }
 while (true);
    }
    do {
      try {
        AbstractFile subFiles[]=file.ls();
        for (int i=0; i < subFiles.length && getState() != INTERRUPTED; i++) {
          nextFile(subFiles[i]);
          processFile(subFiles[i],destFile);
        }
        destFile.changeDate(file.getDate());
        return true;
      }
 catch (      IOException e) {
        int ret=showErrorDialog(errorDialogTitle,Translator.get("String_Node_Str",destFile.getName()));
        if (ret == RETRY_ACTION)         continue;
        return false;
      }
    }
 while (true);
  }
 else {
    return tryCopyFile(file,destFile,append,errorDialogTitle);
  }
}

Fixed version (ground truth):
/** 
 * Copies recursively the given file or folder. 
 * @param file the file or folder to move
 * @param recurseParams destination folder where the given file will be copied (null for top level files)
 * @return <code>true</code> if the file has been copied.
 */
protected boolean processFile(AbstractFile file,Object recurseParams){
  if (getState() == INTERRUPTED)   return false;
  AbstractFile destFolder=recurseParams == null ? baseDestFolder : (AbstractFile)recurseParams;
  boolean isFileInBaseFolder=files.indexOf(file) != -1;
  if (mode == UNPACK_MODE && isFileInBaseFolder) {
    do {
      try {
        AbstractFile archiveFiles[]=currentFile.ls();
        for (int j=0; j < archiveFiles.length && getState() != INTERRUPTED; j++) {
          nextFile(archiveFiles[j]);
          processFile(archiveFiles[j],destFolder);
        }
        return true;
      }
 catch (      IOException e) {
        int ret=showErrorDialog(errorDialogTitle,Translator.get("String_Node_Str",currentFile.getName()));
        if (ret == RETRY_ACTION)         continue;
        return false;
      }
    }
 while (true);
  }
  String originalName=file.getName();
  String destFileName;
  if (isFileInBaseFolder && newName != null)   destFileName=newName;
 else   destFileName=originalName;
  AbstractFile destFile;
  do {
    try {
      destFile=destFolder.getDirectChild(destFileName);
      currentDestFile=destFile;
      break;
    }
 catch (    IOException e) {
      int ret=showErrorDialog(errorDialogTitle,Translator.get("String_Node_Str",destFileName));
      if (ret == RETRY_ACTION)       continue;
      return false;
    }
  }
 while (true);
  if (file.isSymlink())   return true;
  int collision=FileCollisionChecker.checkForCollision(file,destFile);
  boolean append=false;
  if (collision != FileCollisionChecker.NO_COLLOSION) {
    int choice;
    if (defaultFileExistsAction == FileCollisionDialog.ASK_ACTION) {
      FileCollisionDialog dialog=new FileCollisionDialog(progressDialog,mainFrame,collision,file,destFile,true);
      choice=waitForUserResponse(dialog);
      if (dialog.applyToAllSelected())       defaultFileExistsAction=choice;
    }
 else     choice=defaultFileExistsAction;
    if (choice == -1 || choice == FileCollisionDialog.CANCEL_ACTION) {
      interrupt();
      return false;
    }
 else     if (choice == FileCollisionDialog.SKIP_ACTION) {
      return false;
    }
 else     if (choice == FileCollisionDialog.RESUME_ACTION) {
      append=true;
    }
 else     if (choice == FileCollisionDialog.OVERWRITE_ACTION) {
    }
 else     if (choice == FileCollisionDialog.OVERWRITE_IF_OLDER_ACTION) {
      if (file.getDate() <= destFile.getDate())       return false;
    }
  }
  if (file.isDirectory()) {
    if (!(destFile.exists() && destFile.isDirectory())) {
      do {
        try {
          destFile.mkdir();
        }
 catch (        IOException e) {
          int ret=showErrorDialog(errorDialogTitle,Translator.get("String_Node_Str",destFileName));
          if (ret == RETRY_ACTION)           continue;
          return false;
        }
        break;
      }
 while (true);
    }
    do {
      try {
        AbstractFile subFiles[]=file.ls();
        for (int i=0; i < subFiles.length && getState() != INTERRUPTED; i++) {
          nextFile(subFiles[i]);
          processFile(subFiles[i],destFile);
        }
        destFile.changeDate(file.getDate());
        return true;
      }
 catch (      IOException e) {
        int ret=showErrorDialog(errorDialogTitle,Translator.get("String_Node_Str",file.getName()));
        if (ret == RETRY_ACTION)         continue;
        return false;
      }
    }
 while (true);
  }
 else {
    return tryCopyFile(file,destFile,append,errorDialogTitle);
  }
}