Program: 47570
Project: 47570
Buggy source:
public void doImport(final ImportSource importSource,String destFolderPath,final String versionMessage,final boolean overwrite) throws IOException {
  executableTypes=new HashSet<String>();
  if (pluginManager != null && pluginManager.getContentTypes() != null) {
    executableTypes.addAll(pluginManager.getContentTypes());
  }
  executableTypes.add("String_Node_Str");
  executableTypes.add("String_Node_Str");
  destFolderPath=FilenameUtils.separatorsToUnix(destFolderPath);
  if (!destFolderPath.endsWith("String_Node_Str")) {
    destFolderPath+="String_Node_Str";
  }
  long beginTimeMillis=System.currentTimeMillis();
  logger.debug("String_Node_Str");
  Map<String,Serializable> parentIdCache=new HashMap<String,Serializable>();
  logger.debug("String_Node_Str" + destFolderPath);
  for (  final ImportContentHandler handler : contentHandlers) {
    try {
      handler.initialize(unifiedRepository,converters,destFolderPath,versionMessage);
    }
 catch (    InitializationException e) {
      logger.error("String_Node_Str" + handler.getName() + "String_Node_Str"+ e.getLocalizedMessage());
    }
  }
  int totalFileCount=0;
  int importedFileCount=0;
  for (  IRepositoryFileBundle bundle : importSource.getFiles()) {
    totalFileCount+=1;
    String bundlePath=bundle.getPath();
    bundlePath=FilenameUtils.separatorsToUnix(bundlePath);
    if (bundlePath.startsWith("String_Node_Str")) {
      bundlePath=bundlePath.substring(1);
    }
    ImportContentHandler.Result result=ImportContentHandler.Result.SKIPPED;
    for (    final ImportContentHandler handler : contentHandlers) {
      try {
        result=handler.performImport(bundle,overwrite);
        if (ImportContentHandler.Result.SUCCESS == result) {
          logger.debug("String_Node_Str" + handler.getName() + "String_Node_Str"+ bundlePath+ bundle.getFile().getName()+ "String_Node_Str");
          break;
        }
      }
 catch (      ImportException e) {
        logger.error("String_Node_Str" + handler.getName() + "String_Node_Str"+ e.getLocalizedMessage());
      }
    }
    if (ImportContentHandler.Result.SUCCESS == result) {
      continue;
    }
    String repoFilePath=destFolderPath + bundlePath + bundle.getFile().getName();
    RepositoryFile file=unifiedRepository.getFile(repoFilePath);
    String ext=getExtension(bundle.getFile().getName());
    if (file != null) {
      if (!overwrite) {
        continue;
      }
      if (file.isFolder()) {
        continue;
      }
      IRepositoryFileData data=null;
      try {
        ext=getExtension(bundle.getFile().getName());
        if (ext == null) {
          logger.warn(Messages.getInstance().getString("String_Node_Str",bundlePath));
          continue;
        }
        Converter converter=converters.get(ext);
        data=converter.convert(bundle.getInputStream(),bundle.getCharset(),bundle.getMimeType());
      }
 catch (      IOException e) {
        logger.warn(Messages.getInstance().getString("String_Node_Str",bundle.getFile().getName()),e);
        continue;
      }
      unifiedRepository.updateFile(file,data,versionMessage);
    }
 else     if (bundle.getFile().isFolder()) {
      logger.debug("String_Node_Str" + bundlePath);
      if (bundle.getAcl() != null) {
        unifiedRepository.createFolder(getParentId(destFolderPath,bundlePath,parentIdCache),bundle.getFile(),bundle.getAcl(),versionMessage);
      }
 else {
        unifiedRepository.createFolder(getParentId(destFolderPath,bundlePath,parentIdCache),bundle.getFile(),versionMessage);
      }
      importedFileCount+=1;
    }
 else {
      ext=getExtension(bundle.getFile().getName());
      if (ext == null) {
        logger.warn(Messages.getInstance().getString("String_Node_Str",bundlePath) + bundle.getFile().getName());
        continue;
      }
      Converter converter=converters.get(ext);
      if (converter == null) {
        logger.warn(Messages.getInstance().getString("String_Node_Str",bundlePath + bundle.getFile().getName()));
        continue;
      }
      if (bundle.getMimeType() == null) {
        logger.warn(Messages.getInstance().getString("String_Node_Str",bundlePath + bundle.getFile().getName()));
        continue;
      }
      IRepositoryFileData data=null;
      try {
        data=converter.convert(bundle.getInputStream(),bundle.getCharset(),bundle.getMimeType());
      }
 catch (      IOException e) {
        logger.warn(Messages.getInstance().getString("String_Node_Str",bundle.getFile().getName()),e);
        continue;
      }
      logger.debug("String_Node_Str" + bundlePath + bundle.getFile().getName());
      RepositoryFile createdFile=null;
      if (bundle.getAcl() != null) {
        createdFile=unifiedRepository.createFile(getParentId(destFolderPath,bundlePath,parentIdCache),bundle.getFile(),data,bundle.getAcl(),versionMessage);
      }
 else {
        createdFile=unifiedRepository.createFile(getParentId(destFolderPath,bundlePath,parentIdCache),bundle.getFile(),data,versionMessage);
      }
      try {
        data=converter.convert(bundle.getInputStream(),bundle.getCharset(),bundle.getMimeType());
      }
 catch (      IOException e) {
        logger.warn(Messages.getInstance().getString("String_Node_Str",bundle.getFile().getName()),e);
        continue;
      }
      createdFile=new Builder(createdFile).hidden(!executableTypes.contains(ext.toLowerCase())).build();
      unifiedRepository.updateFile(createdFile,data,versionMessage);
      importedFileCount+=1;
    }
  }
  logger.debug("String_Node_Str");
  logger.info(Messages.getInstance().getString("String_Node_Str",importedFileCount,totalFileCount,System.currentTimeMillis() - beginTimeMillis));
}

Fixed version (ground truth):
public void doImport(final ImportSource importSource,String destFolderPath,final String versionMessage,final boolean overwrite) throws IOException {
  executableTypes=new HashSet<String>();
  if (pluginManager != null && pluginManager.getContentTypes() != null) {
    executableTypes.addAll(pluginManager.getContentTypes());
  }
  executableTypes.add("String_Node_Str");
  executableTypes.add("String_Node_Str");
  destFolderPath=FilenameUtils.separatorsToUnix(destFolderPath);
  if (!destFolderPath.endsWith("String_Node_Str")) {
    destFolderPath+="String_Node_Str";
  }
  long beginTimeMillis=System.currentTimeMillis();
  logger.debug("String_Node_Str");
  Map<String,Serializable> parentIdCache=new HashMap<String,Serializable>();
  logger.debug("String_Node_Str" + destFolderPath);
  for (  final ImportContentHandler handler : contentHandlers) {
    try {
      handler.initialize(unifiedRepository,converters,destFolderPath,versionMessage);
    }
 catch (    InitializationException e) {
      logger.error("String_Node_Str" + handler.getName() + "String_Node_Str"+ e.getLocalizedMessage());
    }
  }
  int totalFileCount=0;
  int importedFileCount=0;
  for (  IRepositoryFileBundle bundle : importSource.getFiles()) {
    totalFileCount+=1;
    String bundlePath=bundle.getPath();
    bundlePath=FilenameUtils.separatorsToUnix(bundlePath);
    if (bundlePath.startsWith("String_Node_Str")) {
      bundlePath=bundlePath.substring(1);
    }
    ImportContentHandler.Result result=ImportContentHandler.Result.SKIPPED;
    for (    final ImportContentHandler handler : contentHandlers) {
      try {
        result=handler.performImport(bundle,overwrite);
        if (ImportContentHandler.Result.SUCCESS == result) {
          logger.debug("String_Node_Str" + handler.getName() + "String_Node_Str"+ bundlePath+ bundle.getFile().getName()+ "String_Node_Str");
          break;
        }
      }
 catch (      ImportException e) {
        logger.error("String_Node_Str" + handler.getName() + "String_Node_Str"+ e.getLocalizedMessage());
      }
    }
    if (ImportContentHandler.Result.SUCCESS == result) {
      continue;
    }
    String repoFilePath=destFolderPath + bundlePath + bundle.getFile().getName();
    RepositoryFile file=unifiedRepository.getFile(repoFilePath);
    String ext=getExtension(bundle.getFile().getName());
    if (file != null) {
      if (!overwrite) {
        continue;
      }
      if (file.isFolder()) {
        continue;
      }
      IRepositoryFileData data=null;
      try {
        ext=getExtension(bundle.getFile().getName());
        if (ext == null) {
          logger.warn(Messages.getInstance().getString("String_Node_Str",bundlePath));
          continue;
        }
        Converter converter=converters.get(ext);
        data=converter.convert(bundle.getInputStream(),bundle.getCharset(),bundle.getMimeType());
      }
 catch (      IOException e) {
        logger.warn(Messages.getInstance().getString("String_Node_Str",bundle.getFile().getName()),e);
        continue;
      }
      unifiedRepository.updateFile(file,data,versionMessage);
    }
 else     if (bundle.getFile().isFolder()) {
      logger.debug("String_Node_Str" + bundlePath);
      if (bundle.getAcl() != null) {
        repositoryUtils.getFolder(repoFilePath,bundle.getAcl(),true,true,versionMessage);
        unifiedRepository.createFolder(getParentId(destFolderPath,bundlePath,parentIdCache),bundle.getFile(),bundle.getAcl(),versionMessage);
      }
 else {
        repositoryUtils.getFolder(repoFilePath,true,true,versionMessage);
      }
      importedFileCount+=1;
    }
 else {
      ext=getExtension(bundle.getFile().getName());
      if (ext == null) {
        logger.warn(Messages.getInstance().getString("String_Node_Str",bundlePath) + bundle.getFile().getName());
        continue;
      }
      Converter converter=converters.get(ext);
      if (converter == null) {
        logger.warn(Messages.getInstance().getString("String_Node_Str",bundlePath + bundle.getFile().getName()));
        continue;
      }
      if (bundle.getMimeType() == null) {
        logger.warn(Messages.getInstance().getString("String_Node_Str",bundlePath + bundle.getFile().getName()));
        continue;
      }
      IRepositoryFileData data=null;
      try {
        data=converter.convert(bundle.getInputStream(),bundle.getCharset(),bundle.getMimeType());
      }
 catch (      IOException e) {
        logger.warn(Messages.getInstance().getString("String_Node_Str",bundle.getFile().getName()),e);
        continue;
      }
      logger.debug("String_Node_Str" + bundlePath + bundle.getFile().getName());
      RepositoryFile createdFile=null;
      if (bundle.getAcl() != null) {
        createdFile=unifiedRepository.createFile(getParentId(destFolderPath,bundlePath,parentIdCache),bundle.getFile(),data,bundle.getAcl(),versionMessage);
      }
 else {
        createdFile=unifiedRepository.createFile(getParentId(destFolderPath,bundlePath,parentIdCache),bundle.getFile(),data,versionMessage);
      }
      try {
        data=converter.convert(bundle.getInputStream(),bundle.getCharset(),bundle.getMimeType());
      }
 catch (      IOException e) {
        logger.warn(Messages.getInstance().getString("String_Node_Str",bundle.getFile().getName()),e);
        continue;
      }
      createdFile=new Builder(createdFile).hidden(!executableTypes.contains(ext.toLowerCase())).build();
      unifiedRepository.updateFile(createdFile,data,versionMessage);
      importedFileCount+=1;
    }
  }
  logger.debug("String_Node_Str");
  logger.info(Messages.getInstance().getString("String_Node_Str",importedFileCount,totalFileCount,System.currentTimeMillis() - beginTimeMillis));
}