function getAdjacentAndMissing (currentNode, allData, specRoot) {
  let currentNodeReferences,
    currentContent = currentNode.content,
    graphAdj = [],
    missingNodes = [],
    OASObject;
  if (currentNode.parsed) {
    OASObject = currentNode.parsed;
  }
  else {
    OASObject = parse.getOasObject(currentContent);
  }
  currentNodeReferences = getReferences(OASObject, isExtRef, removeLocalReferenceFromPath);

  currentNodeReferences.forEach((reference) => {
    let referencePath = reference.path,
      adjacentNode = findNodeFromPath(calculatePath(currentNode.fileName, referencePath), allData);
    if (adjacentNode) {
      graphAdj.push(adjacentNode);
    }
    else if (!comparePaths(referencePath, specRoot.fileName)) {
      let calculatedPathForMissing = calculatePathMissing(currentNode.fileName, referencePath);
      if (!calculatedPathForMissing.$ref) {
        missingNodes.push({ path: calculatedPathForMissing.path });
      }
      else {
        missingNodes.push({ $ref: calculatedPathForMissing.$ref, path: null });
      }
    }
  });
  return { graphAdj, missingNodes };
}
Maps the output from get root files to detect root files
@param {object} currentNode - current { path, content} object
@param {Array} allData -  array of { path, content} objects
@param {object} specRoot - root file information
@returns {object} - Detect root files result object