Is the node pointed to by @ref path a component?
507986
def is_component(self, path):
        ''''''
        node = self.get_node(path)
        if not node:
            return False
        return node.is_component
1106599
def parse_component_reference(self, node):
        

        if 'name' in node.lattrib:
            name = node.lattrib['name']
        else:
            self.raise_error('<ComponentReference> must specify a name for the ' +
                             'reference.')

        if 'type' in node.lattrib:
            type_ = node.lattrib['type']
        else:
            self.raise_error('<ComponentReference> must specify a type for the ' +
                             'reference.')
                             
        if 'local' in node.lattrib:
            local = node.lattrib['local']
        else:
            local = None

        self.current_component_type.add_component_reference(ComponentReference(name, type_, local))
217414
function findRefObject (ref, components) {
  const [ typeAndName, jsonSelector ] = typeNamePath(ref)

  const [ , refObj ] = findComponent(
    typeAndName,
    components,
    jsonSelector
  )

  if (!refObj) {
    return findRefObjectsByWildcard(typeAndName, components)
  }

  return refObj
}
1250910
function(fullSchema, schema, seenObjects, path, options) {
  // Top level reference, dereference it
  if(schema['$ref']) {
    // Dereference
    var dereference = deref(fullSchema, '', schema["$ref"], seenObjects, options);
    // Delete the tag
    delete(schema['$ref']);
    // Merge the dereferenced value
    for(var name in dereference) {
      schema[name] = dereference[name];
    }
  }

  for(var name in schema) {
    var value = schema[name];
    path.push(name);

    if(value instanceof Object) {
      // Extract the path
      if(value["$ref"]) {
        // Get the reference
        var reference = value["$ref"];
        // Unroll the reference
        var dereference = deref(fullSchema, name, reference, seenObjects, path, options);
        // Add the dereferenced value
        schema[name] = dereference;
      } else {
        extractReferences(fullSchema, value, seenObjects, path, options);
      }
    }

    path.pop();
  }
}
943565
function (pageId, isCommon, refpath) {
            var modulesPath = this._modulesPaths;
            if (isCommon) {
                modulesPath.common.push(refpath);
                return;
            }
            modulesPath.page[pageId] = modulesPath.page[pageId] || [];
            modulesPath.page[pageId].push(refpath);
        }
959499
@Override
    public R visitReference(ReferenceTree node, P p) {
        return defaultAction(node, p);
    }
915850
private boolean isGoodRefToAdd(@Nullable StaticRef ref) {
    return ref != null
        && ref.getNode() != null
        && ref.getNode().getStaticSourceFile() != null
        && !Compiler.SYNTHETIC_EXTERNS.equals(ref.getNode().getStaticSourceFile().getName());
  }
640221
private void checkInheritedRelativePaths( ClassDeclaration jclass )
            throws FatalCompileTimeException
    {
        for ( ClassType type = jclass.getSuperclass();
              type != null && CompilerUtils.isAssignableFrom( FLOWCONTROLLER_BASE_CLASS, type, getEnv() );
              type = type.getSuperclass() )
        {
            TypeDeclaration decl = CompilerUtils.getDeclaration( type );
            
            //
            // Check simple actions in the Controller annotation.
            //
            List simpleActions =
                    CompilerUtils.getAnnotationArrayValue( decl, CONTROLLER_TAG_NAME, SIMPLE_ACTIONS_ATTR, true );
            
            if ( simpleActions != null )
            {
                for ( Iterator j = simpleActions.iterator(); j.hasNext(); )  
                {
                    AnnotationInstance i = ( AnnotationInstance ) j.next();
                    checkRelativePath( i, PATH_ATTR, jclass, decl, false );
                    List conditionalForwards = CompilerUtils.getAnnotationArray( i, CONDITIONAL_FORWARDS_ATTR, true );
                    
                    if ( conditionalForwards != null )
                    {
                        for ( Iterator k = conditionalForwards.iterator(); k.hasNext(); )  
                        {
                            AnnotationInstance ann = ( AnnotationInstance ) k.next();
                            checkRelativePath( ann, PATH_ATTR, jclass, decl, false );
                        }
                    }
                }
            }
            
            //
            // Check Forwards in the Controller annotation.
            //
            List forwards = CompilerUtils.getAnnotationArrayValue( decl, CONTROLLER_TAG_NAME, FORWARDS_ATTR, true );
            
            if ( forwards != null )
            {
                for ( Iterator ii = forwards.iterator(); ii.hasNext(); )  
                {
                    AnnotationInstance i = ( AnnotationInstance ) ii.next();
                    checkRelativePath( i, PATH_ATTR, jclass, decl, false );
                }
            }
            
            //
            // Check Catches in the Controller annotation.
            //
            List catches = CompilerUtils.getAnnotationArrayValue( decl, CONTROLLER_TAG_NAME, CATCHES_ATTR, true );
            
            if ( catches != null )
            {
                for ( Iterator j = catches.iterator(); j.hasNext(); )  
                {
                    AnnotationInstance i = ( AnnotationInstance ) j.next();
                    checkRelativePath( i, PATH_ATTR, jclass, decl, false );
                }
            }

            //
            // Check strutsMerge and validatorMerge in the Controller annotation.
            //
            AnnotationInstance controllerAnnotation = CompilerUtils.getAnnotation( decl, CONTROLLER_TAG_NAME );

            if ( controllerAnnotation != null )
            {
                checkRelativePath( controllerAnnotation, VALIDATOR_MERGE_ATTR, jclass, decl, true );
                checkRelativePath( controllerAnnotation, STRUTSMERGE_ATTR, jclass, decl, true );
            }
            
            //
            // Check Forwards and Catches on action methods and exception-handler methods.
            //
            MethodDeclaration[] methods = decl.getMethods();
            for ( int i = 0; i < methods.length; i++ )
            {
                MethodDeclaration method = methods[i];
                AnnotationInstance ann = CompilerUtils.getAnnotation( method, ACTION_TAG_NAME);
                if ( ann == null ) ann = CompilerUtils.getAnnotation( method, EXCEPTION_HANDLER_TAG_NAME );
                
                if ( ann != null )
                {
                    List methodForwards = CompilerUtils.getAnnotationArray( ann, FORWARDS_ATTR, true );
                    String methodName = method.getSimpleName();
                    
                    if ( methodForwards != null )
                    {
                        for ( Iterator j = methodForwards.iterator(); j.hasNext(); )
                        {
                            AnnotationInstance methodForward = ( AnnotationInstance ) j.next();
                            checkRelativePath( methodName, methodForward, PATH_ATTR, jclass, decl, false );
                        }
                    }
                    
                    List methodCatches = CompilerUtils.getAnnotationArray( ann, CATCHES_ATTR, true );
                    
                    if ( methodCatches != null )
                    {
                        for ( Iterator j = methodCatches.iterator(); j.hasNext(); )
                        {
                            AnnotationInstance methodCatch = ( AnnotationInstance ) j.next();
                            checkRelativePath( methodName, methodCatch, PATH_ATTR, jclass, decl, false );
                        }
                    }
                }
            }
        }
    }
1331552
Node inline(Reference ref, String fnName, Node fnNode) {
    checkState(compiler.getLifeCycleStage().isNormalized());
    return internalInline(ref, fnName, fnNode);
  }
241131
function mapLocalReference (node) {
    if ((node === undefined) || (node === null)) return undefined;
    var ref = _getFirstChildNS(node, 'Ref');
    if ((ref === undefined) || (ref === null)) return undefined;
    return getAttrValue(ref, 'id');
  }
1163347
@OverrideOnDemand
  protected boolean linkNeedsContextPath (@Nullable final String sHref)
  {
    if (sHref == null)
      return false;

    // If prefix is defined and already present no need to change something
    // Or if the server prefix path is just "/" and the links starts with "/"
    // it's also fine
    if (sHref.startsWith (m_sServerPrefixPath))
      return false;

    // javascript: and mailto: are handled by URLProtocolRegistry
    if (URLProtocolRegistry.getInstance ().hasKnownProtocol (sHref) || sHref.startsWith ("#"))
      return false;

    // Prefix is needed
    return true;
  }
1195575
public function tree($ref = 'HEAD', $path = null)
    {
        if ($path instanceof NodeObject) {
            $subjectPath = $path->getFullPath() . ($path->isTree() ? '/' : '');
        }
        else {
            $subjectPath = $path;
        }

        $what = $ref;
        if ($ref instanceof TreeishInterface) {
            $what = $ref->getSha();
        }
        $this->clearAll();
        $this->addCommandName(self::LS_TREE_COMMAND);
        $this->addCommandArgument('-l');
        $subject = $what;
        $this->addCommandSubject($subject);
        $this->addPath($subjectPath);

        return $this->getCommand();
    }
198111
function Pointer ($ref, path, friendlyPath) {
  /**
   * The {@link $Ref} object that contains this {@link Pointer} object.
   * @type {$Ref}
   */
  this.$ref = $ref;

  /**
   * The file path or URL, containing the JSON pointer in the hash.
   * This path is relative to the path of the main JSON schema file.
   * @type {string}
   */
  this.path = path;

  /**
   * The original path or URL, used for error messages.
   * @type {string}
   */
  this.originalPath = friendlyPath || path;

  /**
   * The value of the JSON pointer.
   * Can be any JSON type, not just objects. Unknown file types are represented as Buffers (byte arrays).
   * @type {?*}
   */
  this.value = undefined;

  /**
   * Indicates whether the pointer references itself.
   * @type {boolean}
   */
  this.circular = false;

  /**
   * The number of indirect references that were traversed to resolve the value.
   * Resolving a single pointer may require resolving multiple $Refs.
   * @type {number}
   */
  this.indirections = 0;
}
1170291
function resolveRef(swagger, ref) {
  if (ref.indexOf('#/') != 0) {
    console.error('Resolved references must start with #/. Current: ' + ref);
    process.exit(1);
  }
  var parts = ref.substr(2).split('/');
  var result = swagger;
  for (var i = 0; i < parts.length; i++) {
    var part = parts[i];
    result = result[part];
  }
  return result === swagger ? {} : result;
}
247091
function ReferencedIdentifier(_ref2) {
      */var node = _ref2.node;
      */var scope = _ref2.scope;

      if (node.name === "exports" && !scope.getBinding("exports")) {
        this.hasExports = true;
      }

      if (node.name === "module" && !scope.getBinding("module")) {
        this.hasModule = true;
      }
    }
10968
void setCurrent(TreePath path, DocCommentTree comment) {
        currPath = path;
        currDocComment = comment;
        currElement = trees.getElement(currPath);
        currOverriddenMethods = ((JavacTypes) types).getOverriddenMethods(currElement);

        AccessKind ak = AccessKind.PUBLIC;
        for (TreePath p = path; p != null; p = p.getParentPath()) {
            Element e = trees.getElement(p);
            if (e != null && e.getKind() != ElementKind.PACKAGE) {
                ak = min(ak, AccessKind.of(e.getModifiers()));
            }
        }
        currAccess = ak;
    }
1127073
function(path) {
          var node = path.node;
          // console.log('literal node',node);
          if (typeof node.value === 'string') {
            options.sourceNameVariations.forEach(function(variation,index){
              var sourceIndex, typeIndex, segment;
              var sourceRegexp = new RegExp(variation);
              var destReplacement = options.destNameVariations[index];
              var variationIndex = node.value.indexOf(variation);
              if (variationIndex !== -1) {
                // console.log(node.value.indexOf(variation))
                // console.log('match: ',variation, destReplacement, node)
                if (variationIndex === 0 || node.value.charAt(variationIndex - 1) === ' ') {
                  hasSourceRef = true;
                  // console.log(node.value.replace(sourceRegexp, destReplacement))
                  node.value = node.value.replace(sourceRegexp, destReplacement);
                } else {

                  /*
                  example1: my-app/components/foo/bar/foo-bar.js
                  example2: my-app/components/bar/foo-bar.js
                  sourceName: bar/foo-bar.js
                  match the sourceName, determine if the sourcename is at
                  the type root (components for this example)

                  this probably needs to be handled at a structure level.
                  */
                  // console.log(variation + ' matched: ' + node.value + ', but was not first index');
                  sourceIndex = node.value.indexOf(options.sourceName);
                  typeIndex = node.value.indexOf(options.sourceTypeName);
                  segment = node.value.substr((typeIndex + options.sourceTypeName.length + 1), node.value.length);
                  // console.log('diff', segment, options.sourceName,typeIndex, (typeIndex + options.sourceTypeName.length), sourceIndex, options.sourceTypeName);
                  if (segment === options.sourceName) {
                    hasSourceRef = true;
                    node.value = node.value.replace(sourceRegexp, destReplacement);
                    // console.log('rewriting literal', node.value);
                  }
                }
              }
            });
          }
          this.traverse(path);
        }