function getVariablePaths(
  targetExportsResult,
  refFindExportsResult,
  targetMatchedFile,
  fromClass,
  toClass,
  refProjectName,
) {
  /* eslint-disable arrow-body-style */

  /**
   * finds all paths that export WolfCheckbox
   * @example ['./src/WolfCheckbox.js', './index.js']
   * @type {string[]}
   */
  const targetPaths = [];

  targetExportsResult.queryOutput.forEach(({ file: targetExportsFile, result }) => {
    // Find the FindExportAnalyzerEntry with the same rootFile as the rootPath of match-subclasses
    // (targetMatchedFile)
    const targetPathMatch = result.find(targetExportsEntry => {
      return targetExportsEntry.rootFileMap.find(rootFileMapEntry => {
        if (!rootFileMapEntry) {
          return false;
        }
        const { rootFile } = rootFileMapEntry;
        if (rootFile.specifier !== toClass) {
          return false;
        }
        if (rootFile.file === '[current]') {
          return targetExportsFile === targetMatchedFile;
        }
        return rootFile.file === targetMatchedFile;
      });
    });
    if (targetPathMatch) {
      targetPaths.push(targetExportsFile);
    }
  });

  if (!targetPaths.length) {
    return undefined; // there would be nothing to replace
  }

  const targetPath = getClosestToRootTargetPath(targetPaths, targetExportsResult);

  // [A3]
  /**
   * finds all paths that import LionCheckbox
   * @example ['./packages/checkbox/src/LionCheckbox.js', './index.js']
   * @type {string[]}
   */
  const refPaths = [];
  refFindExportsResult.queryOutput.forEach(({ file, result }) => {
    const refPathMatch = result.find(entry => {
      if (entry.exportSpecifiers.includes(fromClass)) {
        return true;
      }
      // if we're dealing with `export {x as y}`...
      if (entry.localMap && entry.localMap.find(({ exported }) => exported === fromClass)) {
        return true;
      }
      return false;
    });
    if (refPathMatch) {
      refPaths.push(file);
    }
  });

  const paths = refPaths.map(refP => ({ from: refP, to: targetPath }));

  // Add all paths with project prefix as well.
  const projectPrefixedPaths = paths.map(({ from, to }) => {
    return { from: `${refProjectName}/${from.slice(2)}`, to };
  });

  return [...paths, ...projectPrefixedPaths];
  /* eslint-enable arrow-body-style */
}
@param {FindExportsAnalyzerResult} targetExportsResult
@param {FindExportsAnalyzerResult} refFindExportsResult
@param {string} targetMatchedFile file where `toClass` from match-subclasses is defined
@param {string} fromClass Identifier exported by reference project, for instance LionCheckbox
@param {string} toClass Identifier exported by target project, for instance WolfCheckbox
@param {string} refProjectName for instance @lion/checkbox