Program: 168493
Project: 168493
Buggy source:
@Override public boolean startDirectory(String[] parentPath,FSFolder folder){
  final File outDir=outDirStack.getLast();
  final CreateDirectoryFailedAction originalCreateDirectoryFailedAction=extractProperties.getCreateDirectoryFailedAction();
  final DirectoryExistsAction originalDirectoryExistsAction=extractProperties.getDirectoryExistsAction();
  CreateDirectoryFailedAction defaultCreateDirectoryFailedAction=originalCreateDirectoryFailedAction;
  DirectoryExistsAction defaultDirectoryExistsAction=originalDirectoryExistsAction;
  final String originalDirName=folder.getName();
  String dirName=originalDirName;
  while (dirName != null) {
    String curDirName=dirName;
    dirName=null;
    pm.updateCurrentDir(curDirName);
    File thisDir=new File(outDir,curDirName);
    if (defaultDirectoryExistsAction != DirectoryExistsAction.CONTINUE && thisDir.exists()) {
      DirectoryExistsAction a;
      if (defaultDirectoryExistsAction == DirectoryExistsAction.PROMPT_USER)       a=pm.directoryExists(thisDir);
 else       a=defaultDirectoryExistsAction;
      boolean resetLoop=false;
switch (a) {
case CONTINUE:
        break;
case RENAME:
      dirName=pm.displayRenamePrompt(curDirName,outDir);
    if (dirName == null)     dirName=curDirName;
  resetLoop=true;
break;
case AUTO_RENAME:
dirName=FileNameTools.autoRenameIllegalFilename(curDirName,outDir,true);
if (dirName == null) dirName=curDirName;
resetLoop=true;
break;
case SKIP_DIRECTORY:
resetLoop=true;
break;
case CANCEL:
resetLoop=true;
pm.signalCancel();
break;
default :
throw new RuntimeException("String_Node_Str" + a);
}
if (resetLoop) continue;
}
if (thisDir.mkdir() || thisDir.exists()) {
if (curDirName != (Object)originalDirName && !curDirName.equals(originalDirName)) errorMessages.addLast("String_Node_Str" + originalDirName + "String_Node_Str"+ curDirName+ "String_Node_Str"+ outDir.getAbsolutePath()+ "String_Node_Str");
outDirStack.addLast(thisDir);
return true;
}
 else {
CreateDirectoryFailedAction a;
if (defaultCreateDirectoryFailedAction == CreateDirectoryFailedAction.PROMPT_USER) a=pm.createDirectoryFailed(curDirName,outDir);
 else {
a=defaultCreateDirectoryFailedAction;
defaultCreateDirectoryFailedAction=CreateDirectoryFailedAction.PROMPT_USER;
}
switch (a) {
case SKIP_DIRECTORY:
errorMessages.addLast("String_Node_Str" + thisDir.getAbsolutePath() + "String_Node_Str");
break;
case RENAME:
dirName=pm.displayRenamePrompt(curDirName,outDir);
if (dirName == null) dirName=curDirName;
break;
case AUTO_RENAME:
dirName=FileNameTools.autoRenameIllegalFilename(curDirName,outDir,true);
if (dirName == null) {
dirName=curDirName;
}
break;
case CANCEL:
pm.signalCancel();
break;
default :
throw new RuntimeException("String_Node_Str" + a);
}
}
}
return false;
}

Fixed version (ground truth):
@Override public boolean startDirectory(String[] parentPath,FSFolder folder){
  final File outDir=outDirStack.getLast();
  final CreateDirectoryFailedAction originalCreateDirectoryFailedAction=extractProperties.getCreateDirectoryFailedAction();
  final DirectoryExistsAction originalDirectoryExistsAction=extractProperties.getDirectoryExistsAction();
  CreateDirectoryFailedAction defaultCreateDirectoryFailedAction=originalCreateDirectoryFailedAction;
  DirectoryExistsAction defaultDirectoryExistsAction=originalDirectoryExistsAction;
  final String originalDirName=folder.getName();
  String dirName=originalDirName;
  while (dirName != null) {
    String curDirName=dirName;
    dirName=null;
    pm.updateCurrentDir(curDirName);
    File thisDir=new File(outDir,curDirName);
    if (defaultDirectoryExistsAction != DirectoryExistsAction.CONTINUE && thisDir.exists()) {
      DirectoryExistsAction a;
      if (defaultDirectoryExistsAction == DirectoryExistsAction.PROMPT_USER)       a=pm.directoryExists(thisDir);
 else       a=defaultDirectoryExistsAction;
      boolean resetLoop=false;
switch (a) {
case CONTINUE:
        break;
case RENAME:
      dirName=pm.displayRenamePrompt(curDirName,outDir);
    if (dirName == null)     dirName=curDirName;
  resetLoop=true;
break;
case AUTO_RENAME:
dirName=FileNameTools.autoRenameIllegalFilename(curDirName,outDir,true);
if (dirName == null) dirName=curDirName;
resetLoop=true;
break;
case SKIP_DIRECTORY:
resetLoop=true;
break;
case CANCEL:
resetLoop=true;
pm.signalCancel();
break;
default :
throw new RuntimeException("String_Node_Str" + a);
}
if (resetLoop) continue;
}
if (thisDir.exists() || (thisDir.mkdir() && thisDir.exists())) {
if (curDirName != (Object)originalDirName && !curDirName.equals(originalDirName)) errorMessages.addLast("String_Node_Str" + originalDirName + "String_Node_Str"+ curDirName+ "String_Node_Str"+ outDir.getAbsolutePath()+ "String_Node_Str");
outDirStack.addLast(thisDir);
return true;
}
 else {
CreateDirectoryFailedAction a;
if (defaultCreateDirectoryFailedAction == CreateDirectoryFailedAction.PROMPT_USER) a=pm.createDirectoryFailed(curDirName,outDir);
 else {
a=defaultCreateDirectoryFailedAction;
defaultCreateDirectoryFailedAction=CreateDirectoryFailedAction.PROMPT_USER;
}
switch (a) {
case SKIP_DIRECTORY:
errorMessages.addLast("String_Node_Str" + thisDir.getAbsolutePath() + "String_Node_Str");
break;
case RENAME:
dirName=pm.displayRenamePrompt(curDirName,outDir);
if (dirName == null) dirName=curDirName;
break;
case AUTO_RENAME:
dirName=FileNameTools.autoRenameIllegalFilename(curDirName,outDir,true);
if (dirName == null) {
dirName=curDirName;
}
break;
case CANCEL:
pm.signalCancel();
break;
default :
throw new RuntimeException("String_Node_Str" + a);
}
}
}
return false;
}