docs: private int analyse(CmsResource res, String sourceMergeFolder, String targetMergefolder, int currentFolder) {
  
          int retValue = -1;
          String resourcenameOther = getResourceNameInOtherFolder(
              m_cms.getSitePath(res),
              sourceMergeFolder,
              targetMergefolder);
          try {
              CmsResource otherRes = m_cms.readResource(resourcenameOther, CmsResourceFilter.IGNORE_EXPIRATION);
              // there was a resource with the same name in the other merge folder
              // now check if it is already a sibling of the current resource
              if (res.getResourceId().equals(otherRes.getResourceId())) {
                  // it is a sibling, so set the action to "sibling already";
                  retValue = FOLDERS_SIBLING;
              } else {
                  // it is no sibling, now test if it has the same resource type than the oringinal resource
                  if (res.getTypeId() == otherRes.getTypeId()) {
                      // both resources have the same type, so set the action to  "same name". Only those resources can be merged
                      retValue = FOLDERS_EQUALNAMES;
                  } else {
                      // both resources have different types, so set the action to "different types"
                      retValue = FOLDERS_DIFFERENTTYPES;
                  }
              }
          } catch (CmsException e) {
              // the resource was not found, so set the action mode to "found only in the source folder"
              if (currentFolder == 1) {
                  retValue = FOLDER1_EXCLUSIVE;
              } else {
                  retValue = FOLDER2_EXCLUSIVE;
              }
          }
  
          return retValue;
      }