code: public static String computeRelativeNamesAfterRenaming(String oldFullName, String newFullName, String relativeNames, ItemGroup context) {
  
          StringTokenizer tokens = new StringTokenizer(relativeNames,",");
          List<String> newValue = new ArrayList<>();
          while(tokens.hasMoreTokens()) {
              String relativeName = tokens.nextToken().trim();
              String canonicalName = getCanonicalName(context, relativeName);
              if (canonicalName.equals(oldFullName) || canonicalName.startsWith(oldFullName+'/')) {
                  String newCanonicalName = newFullName + canonicalName.substring(oldFullName.length());
                  if (relativeName.startsWith("/")) {
                      newValue.add("/" + newCanonicalName);
                  } else {
                      newValue.add(getRelativeNameFrom(newCanonicalName, context.getFullName()));
                  }
              } else {
                  newValue.add(relativeName);
              }
          }
          return StringUtils.join(newValue, ",");
      }
docs: Computes the relative name of list of items after a rename or move occurred.
  Used to manage job references as names in plugins to support {@link hudson.model.listeners.ItemListener#onLocationChanged}.
  <p>
  In a hierarchical context, when a plugin has a reference to a job as <code>../foo/bar</code> this method will
  handle the relative path as "foo" is renamed to "zot" to compute <code>../zot/bar</code>
  
  @param oldFullName the old full name of the item
  @param newFullName the new full name of the item
  @param relativeNames coma separated list of Item relative names
  @param context the {link ItemGroup} relative names refer to
  @return relative name for the renamed item, based on the same ItemGroup context