Program: 92023
Project: 92023
Buggy source:
private boolean importTraces(){
  boolean success=false;
  IOverwriteQuery overwriteQuery=new IOverwriteQuery(){
    @Override public String queryOverwrite(    String file){
      return fOverwrite ? IOverwriteQuery.ALL : IOverwriteQuery.NO_ALL;
    }
  }
;
  FileSystemStructureProvider fileSystemStructureProvider=FileSystemStructureProvider.INSTANCE;
  for (  FileAndName traceToImport : fTraces) {
    try {
      if (fLinked) {
        if (TmfImportHelper.createLink(fTargetFolder,Path.fromOSString(traceToImport.getFile().getAbsolutePath()),traceToImport.getName()) != null) {
          success=false;
        }
 else {
          success=setTraceType(traceToImport).isOK();
        }
      }
 else {
        List<File> subList=new ArrayList<File>();
        IPath path=fTargetFolder.getFullPath();
        File parentFile=traceToImport.getFile();
        final boolean isFile=parentFile.isFile();
        if (isFile) {
          IFile resource=ResourcesPlugin.getWorkspace().getRoot().getFile(path.append(traceToImport.getName()));
          if (fOverwrite || !resource.exists()) {
            subList.add(parentFile);
            parentFile=parentFile.getParentFile();
            final FileInputStream source=new FileInputStream(traceToImport.getFile());
            if (resource.exists()) {
              resource.delete(IResource.FORCE,new NullProgressMonitor());
            }
            resource.create(source,true,new NullProgressMonitor());
            source.close();
            setTraceType(traceToImport);
            success=true;
          }
        }
 else {
          subList.add(traceToImport.getFile());
          File[] fileList=traceToImport.getFile().listFiles();
          for (          File child : fileList) {
            subList.add(child);
          }
          Collections.sort(subList,new Comparator<File>(){
            @Override public int compare(            File o1,            File o2){
              return o1.getAbsolutePath().compareTo(o2.getAbsolutePath());
            }
          }
);
          ImportOperation operation=new ImportOperation(path,parentFile.getParentFile(),fileSystemStructureProvider,overwriteQuery,subList);
          operation.setContext(getShell());
          operation.setCreateContainerStructure(false);
          if (executeImportOperation(operation)) {
            setTraceType(traceToImport);
            success=true;
          }
        }
      }
    }
 catch (    Exception e) {
    }
  }
  return success;
}

Fixed version (ground truth):
private boolean importTraces(){
  boolean success=false;
  IOverwriteQuery overwriteQuery=new IOverwriteQuery(){
    @Override public String queryOverwrite(    String file){
      return fOverwrite ? IOverwriteQuery.ALL : IOverwriteQuery.NO_ALL;
    }
  }
;
  FileSystemStructureProvider fileSystemStructureProvider=FileSystemStructureProvider.INSTANCE;
  for (  FileAndName traceToImport : fTraces) {
    try {
      if (fLinked) {
        if (TmfImportHelper.createLink(fTargetFolder,Path.fromOSString(traceToImport.getFile().getAbsolutePath()),traceToImport.getName()) == null) {
          success=false;
        }
 else {
          success=setTraceType(traceToImport).isOK();
        }
      }
 else {
        List<File> subList=new ArrayList<File>();
        IPath path=fTargetFolder.getFullPath();
        File parentFile=traceToImport.getFile();
        final boolean isFile=parentFile.isFile();
        if (isFile) {
          IFile resource=ResourcesPlugin.getWorkspace().getRoot().getFile(path.append(traceToImport.getName()));
          if (fOverwrite || !resource.exists()) {
            subList.add(parentFile);
            parentFile=parentFile.getParentFile();
            final FileInputStream source=new FileInputStream(traceToImport.getFile());
            if (resource.exists()) {
              resource.delete(IResource.FORCE,new NullProgressMonitor());
            }
            resource.create(source,true,new NullProgressMonitor());
            source.close();
            setTraceType(traceToImport);
            success=true;
          }
        }
 else {
          subList.add(traceToImport.getFile());
          File[] fileList=traceToImport.getFile().listFiles();
          for (          File child : fileList) {
            subList.add(child);
          }
          Collections.sort(subList,new Comparator<File>(){
            @Override public int compare(            File o1,            File o2){
              return o1.getAbsolutePath().compareTo(o2.getAbsolutePath());
            }
          }
);
          ImportOperation operation=new ImportOperation(path,parentFile.getParentFile(),fileSystemStructureProvider,overwriteQuery,subList);
          operation.setContext(getShell());
          operation.setCreateContainerStructure(false);
          if (executeImportOperation(operation)) {
            setTraceType(traceToImport);
            success=true;
          }
        }
      }
    }
 catch (    Exception e) {
    }
  }
  return success;
}