Program: 45179
Project: 45179
Buggy source:
/** 
 * Moves recursively the given file or folder. 
 * @param file the file or folder to move
 * @param recurseParams destination folder where the given file will be moved (null for top level files)
 * @return <code>true</code> if the file has been moved completly (copied + deleted).
 */
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;
  String originalName=file.getName();
  String destFileName;
  if (isFileInBaseFolder && newName != null)   destFileName=newName;
 else   destFileName=originalName;
  AbstractFile destFile;
  do {
    try {
      destFile=destFolder.getDirectChild(destFileName);
      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()) {
    do {
      try {
        file.delete();
        return true;
      }
 catch (      IOException e) {
        if (com.mucommander.Debug.ON)         com.mucommander.Debug.trace("String_Node_Str" + e);
        int ret=showErrorDialog(errorDialogTitle,Translator.get("String_Node_Str",file.getAbsolutePath()));
        if (ret == RETRY_ACTION)         continue;
        return false;
      }
    }
 while (true);
  }
  int collision=FileCollisionChecker.checkForCollision(file,destFile);
  boolean append=false;
  boolean caseRenaming=false;
  if (renameMode && collision == FileCollisionChecker.SAME_SOURCE_AND_DESTINATION) {
    String sourceFileName=file.getName();
    if (sourceFileName.equalsIgnoreCase(destFileName) && !sourceFileName.equals(destFileName))     caseRenaming=true;
  }
  if (!caseRenaming && 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 (!append) {
    int moveToHint=file.getMoveToHint(destFile);
    if (moveToHint == AbstractFile.SHOULD_HINT || moveToHint == AbstractFile.MUST_HINT) {
      do {
        try {
          if (file.moveTo(destFile))           return true;
          break;
        }
 catch (        FileTransferException e) {
          int ret=showErrorDialog(errorDialogTitle,Translator.get("String_Node_Str",file.getAbsolutePath()));
          if (ret == RETRY_ACTION)           continue;
          return false;
        }
      }
 while (true);
    }
  }
  if (file.isDirectory()) {
    if (!(destFile.exists() && destFile.isDirectory())) {
      do {
        try {
          destFile.mkdir();
        }
 catch (        IOException e) {
          if (com.mucommander.Debug.ON)           com.mucommander.Debug.trace("String_Node_Str" + e);
          int ret=showErrorDialog(errorDialogTitle,Translator.get("String_Node_Str",destFile.getAbsolutePath()));
          if (ret == RETRY_ACTION)           continue;
          return false;
        }
        break;
      }
 while (true);
    }
    do {
      try {
        AbstractFile subFiles[]=file.ls();
        boolean isFolderEmpty=true;
        for (int i=0; i < subFiles.length; i++) {
          if (getState() == INTERRUPTED)           return false;
          nextFile(subFiles[i]);
          if (!processFile(subFiles[i],destFile))           isFolderEmpty=false;
        }
        destFile.changeDate(file.getDate());
        if (!isFolderEmpty)         return false;
      }
 catch (      IOException e) {
        if (com.mucommander.Debug.ON)         com.mucommander.Debug.trace("String_Node_Str" + e);
        int ret=showErrorDialog(errorDialogTitle,Translator.get("String_Node_Str",file.getAbsolutePath()));
        if (ret == RETRY_ACTION)         continue;
        return false;
      }
      break;
    }
 while (true);
    if (getState() == INTERRUPTED)     return false;
    do {
      try {
        file.delete();
        return true;
      }
 catch (      IOException e) {
        if (com.mucommander.Debug.ON)         com.mucommander.Debug.trace("String_Node_Str" + e);
        int ret=showErrorDialog(errorDialogTitle,Translator.get("String_Node_Str",file.getAbsolutePath()));
        if (ret == RETRY_ACTION)         continue;
        return false;
      }
    }
 while (true);
  }
 else {
    if (tryCopyFile(file,destFile,append,errorDialogTitle) && getState() != INTERRUPTED) {
      do {
        try {
          file.delete();
          return true;
        }
 catch (        IOException e) {
          if (com.mucommander.Debug.ON)           com.mucommander.Debug.trace("String_Node_Str" + e);
          int ret=showErrorDialog(errorDialogTitle,Translator.get("String_Node_Str",file.getAbsolutePath()));
          if (ret == RETRY_ACTION)           continue;
          return false;
        }
      }
 while (true);
    }
    return false;
  }
}

Fixed version (ground truth):
/** 
 * Moves recursively the given file or folder. 
 * @param file the file or folder to move
 * @param recurseParams destination folder where the given file will be moved (null for top level files)
 * @return <code>true</code> if the file has been moved completly (copied + deleted).
 */
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;
  String originalName=file.getName();
  String destFileName;
  if (isFileInBaseFolder && newName != null)   destFileName=newName;
 else   destFileName=originalName;
  AbstractFile destFile;
  do {
    try {
      destFile=destFolder.getDirectChild(destFileName);
      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()) {
    do {
      try {
        file.delete();
        return true;
      }
 catch (      IOException e) {
        if (com.mucommander.Debug.ON)         com.mucommander.Debug.trace("String_Node_Str" + e);
        int ret=showErrorDialog(errorDialogTitle,Translator.get("String_Node_Str",file.getAbsolutePath()));
        if (ret == RETRY_ACTION)         continue;
        return false;
      }
    }
 while (true);
  }
  int collision=FileCollisionChecker.checkForCollision(file,destFile);
  boolean append=false;
  boolean caseRenaming=false;
  if (renameMode && collision == FileCollisionChecker.SAME_SOURCE_AND_DESTINATION) {
    String sourceFileName=file.getName();
    if (sourceFileName.equalsIgnoreCase(destFileName) && !sourceFileName.equals(destFileName))     caseRenaming=true;
  }
  if (!caseRenaming && 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 (!append) {
    int moveToHint=file.getMoveToHint(destFile);
    if (moveToHint == AbstractFile.SHOULD_HINT || moveToHint == AbstractFile.MUST_HINT) {
      do {
        try {
          if (file.moveTo(destFile))           return true;
          break;
        }
 catch (        FileTransferException e) {
          int ret=showErrorDialog(errorDialogTitle,Translator.get("String_Node_Str",file.getAbsolutePath()));
          if (ret == RETRY_ACTION)           continue;
          return false;
        }
      }
 while (true);
    }
  }
  if (file.isDirectory()) {
    if (!(destFile.exists() && destFile.isDirectory())) {
      do {
        try {
          destFile.mkdir();
        }
 catch (        IOException e) {
          int ret=showErrorDialog(errorDialogTitle,Translator.get("String_Node_Str",destFile.getAbsolutePath()));
          if (ret == RETRY_ACTION)           continue;
          return false;
        }
        break;
      }
 while (true);
    }
    do {
      try {
        AbstractFile subFiles[]=file.ls();
        boolean isFolderEmpty=true;
        for (int i=0; i < subFiles.length; i++) {
          if (getState() == INTERRUPTED)           return false;
          nextFile(subFiles[i]);
          if (!processFile(subFiles[i],destFile))           isFolderEmpty=false;
        }
        destFile.changeDate(file.getDate());
        if (!isFolderEmpty)         return false;
      }
 catch (      IOException e) {
        int ret=showErrorDialog(errorDialogTitle,Translator.get("String_Node_Str",file.getName()));
        if (ret == RETRY_ACTION)         continue;
        return false;
      }
      break;
    }
 while (true);
    if (getState() == INTERRUPTED)     return false;
    do {
      try {
        file.delete();
        return true;
      }
 catch (      IOException e) {
        int ret=showErrorDialog(errorDialogTitle,Translator.get("String_Node_Str",file.getAbsolutePath()));
        if (ret == RETRY_ACTION)         continue;
        return false;
      }
    }
 while (true);
  }
 else {
    if (tryCopyFile(file,destFile,append,errorDialogTitle) && getState() != INTERRUPTED) {
      do {
        try {
          file.delete();
          return true;
        }
 catch (        IOException e) {
          if (com.mucommander.Debug.ON)           com.mucommander.Debug.trace("String_Node_Str" + e);
          int ret=showErrorDialog(errorDialogTitle,Translator.get("String_Node_Str",file.getAbsolutePath()));
          if (ret == RETRY_ACTION)           continue;
          return false;
        }
      }
 while (true);
    }
    return false;
  }
}