Program: 44900
Project: 44900
Buggy source:
/** 
 * Creates and returns an instance of AbstractFile for the given FileURL and uses the specified parent file (if any) as the created file's parent. <p>Specifying the file parent if an instance already exists allows to recycle the AbstractFile instance instead of creating a new one when the parent file is requested.
 * @param fileURL the file URL representing the file to be created
 * @param parent the parent AbstractFile to use as the created file's parent, can be <code>null</code>
 * @return an instance of {@link AbstractFile} for the given {@link FileURL}.
 * @throws java.io.IOException if something went wrong during file creation.
 */
public static AbstractFile getFile(FileURL fileURL,AbstractFile parent) throws IOException {
  String filePath=fileURL.getPath();
  if (OsFamilies.WINDOWS.isCurrent() && FileProtocols.FILE.equals(fileURL.getScheme()))   filePath=PathUtils.removeLeadingSeparator(filePath,"String_Node_Str");
  PathTokenizer pt=new PathTokenizer(filePath,fileURL.getPathSeparator(),false);
  AbstractFile currentFile=null;
  boolean lastFileResolved=false;
  while (pt.hasMoreFilenames()) {
    if (isArchiveFilename(pt.nextFilename())) {
      String currentPath=PathUtils.removeTrailingSeparator(pt.getCurrentPath());
      if (currentFile == null || !(currentFile instanceof AbstractArchiveFile)) {
        FileURL clonedURL=(FileURL)fileURL.clone();
        clonedURL.setPath(currentPath);
        currentFile=wrapArchive(createRawFile(clonedURL));
        lastFileResolved=true;
      }
 else {
        AbstractFile tempEntryFile=((AbstractArchiveFile)currentFile).getArchiveEntryFile(PathUtils.removeLeadingSeparator(currentPath.substring(currentFile.getURL().getPath().length(),currentPath.length())));
        if (tempEntryFile instanceof AbstractArchiveFile) {
          currentFile=tempEntryFile;
          lastFileResolved=true;
        }
 else {
          lastFileResolved=false;
        }
      }
    }
 else {
      lastFileResolved=false;
    }
  }
  if (!lastFileResolved) {
    String currentPath=pt.getCurrentPath();
    if (currentFile == null || !(currentFile instanceof AbstractArchiveFile)) {
      FileURL clonedURL=(FileURL)fileURL.clone();
      clonedURL.setPath(currentPath);
      currentFile=createRawFile(clonedURL);
    }
 else {
      currentFile=((AbstractArchiveFile)currentFile).getArchiveEntryFile(PathUtils.removeLeadingSeparator(currentPath.substring(currentFile.getURL().getPath().length(),currentPath.length())));
    }
  }
  if (parent != null)   currentFile.setParent(parent);
  return currentFile;
}

Fixed version (ground truth):
/** 
 * Creates and returns an instance of AbstractFile for the given FileURL and uses the specified parent file (if any) as the created file's parent. <p>Specifying the file parent if an instance already exists allows to recycle the AbstractFile instance instead of creating a new one when the parent file is requested.
 * @param fileURL the file URL representing the file to be created
 * @param parent the parent AbstractFile to use as the created file's parent, can be <code>null</code>
 * @return an instance of {@link AbstractFile} for the given {@link FileURL}.
 * @throws java.io.IOException if something went wrong during file creation.
 */
public static AbstractFile getFile(FileURL fileURL,AbstractFile parent) throws IOException {
  String filePath=fileURL.getPath();
  if (OsFamilies.WINDOWS.isCurrent() && FileProtocols.FILE.equals(fileURL.getScheme()))   filePath=PathUtils.removeLeadingSeparator(filePath,"String_Node_Str");
  String pathSeparator=fileURL.getPathSeparator();
  PathTokenizer pt=new PathTokenizer(filePath,pathSeparator,false);
  AbstractFile currentFile=null;
  boolean lastFileResolved=false;
  while (pt.hasMoreFilenames()) {
    if (isArchiveFilename(pt.nextFilename())) {
      String currentPath=PathUtils.removeTrailingSeparator(pt.getCurrentPath(),pathSeparator);
      if (currentFile == null || !(currentFile instanceof AbstractArchiveFile)) {
        FileURL clonedURL=(FileURL)fileURL.clone();
        clonedURL.setPath(currentPath);
        currentFile=wrapArchive(createRawFile(clonedURL));
        lastFileResolved=true;
      }
 else {
        AbstractFile tempEntryFile=((AbstractArchiveFile)currentFile).getArchiveEntryFile(PathUtils.removeLeadingSeparator(currentPath.substring(currentFile.getURL().getPath().length(),currentPath.length()),pathSeparator));
        if (tempEntryFile instanceof AbstractArchiveFile) {
          currentFile=tempEntryFile;
          lastFileResolved=true;
        }
 else {
          lastFileResolved=false;
        }
      }
    }
 else {
      lastFileResolved=false;
    }
  }
  if (!lastFileResolved) {
    String currentPath=pt.getCurrentPath();
    if (currentFile == null || !(currentFile instanceof AbstractArchiveFile)) {
      FileURL clonedURL=(FileURL)fileURL.clone();
      clonedURL.setPath(currentPath);
      currentFile=createRawFile(clonedURL);
    }
 else {
      currentFile=((AbstractArchiveFile)currentFile).getArchiveEntryFile(PathUtils.removeLeadingSeparator(currentPath.substring(currentFile.getURL().getPath().length(),currentPath.length()),pathSeparator));
    }
  }
  if (parent != null)   currentFile.setParent(parent);
  return currentFile;
}