code: public boolean upgrade(final FileObject newFolder) {
          try {
              if (newFolder.getChildren().length != 0) {
                  // if the folder is not new then we don't want to touch it
                  return false;
              }
  
              final FileObject upgradeFromFolderCandidate = findUpgradeCandidate(newFolder);
  
              if (upgradeFromFolderCandidate == null) {
                  logger.info("Did not find a suitable upgrade candidate");
                  return false;
              }
  
              logger.info("Upgrading DATACLEANER_HOME from : {}", upgradeFromFolderCandidate);
              newFolder.copyFrom(upgradeFromFolderCandidate, new AllFileSelector());
  
              // special handling of userpreferences.dat - we only want to keep
              // the good parts ;-)
              final UserPreferencesUpgrader userPreferencesUpgrader = new UserPreferencesUpgrader(newFolder);
              userPreferencesUpgrader.upgrade();
  
              // Overwrite example jobs
              final List<String> allFilePaths = DataCleanerHome.getAllInitialFiles();
              for (final String filePath : allFilePaths) {
                  overwriteFileWithDefaults(newFolder, filePath);
              }
              return true;
          } catch (final FileSystemException e) {
              logger.warn("Exception occured during upgrading: {}", e);
              return false;
          }
      }
docs: Finds a folder to upgrade from based on the "newFolder" parameter -
  upgrades are performed only within the same major version.
  
  @param newFolder
  The folder we want to upgrade to (the new version)
  @return true if upgrade was successful, false otherwise